Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Cameo
cameo
Commits
3b5be68e
Commit
3b5be68e
authored
Apr 29, 2019
by
legoc
Browse files
Reviewed m_impl pointer in Services
parent
0c425dd6
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/cameo/Server.cpp
View file @
3b5be68e
...
...
@@ -31,8 +31,7 @@ namespace cameo {
Server
::
Server
(
const
std
::
string
&
endpoint
)
:
Services
()
{
m_impl
=
new
ServicesImpl
();
Services
::
setImpl
(
m_impl
);
Services
::
setImpl
(
new
ServicesImpl
());
vector
<
string
>
tokens
=
split
(
endpoint
);
...
...
src/cameo/Server.h
View file @
3b5be68e
...
...
@@ -102,8 +102,6 @@ private:
std
::
unique_ptr
<
application
::
Instance
>
stop
(
int
id
,
bool
immediately
);
std
::
unique_ptr
<
application
::
Subscriber
>
createSubscriber
(
int
id
,
const
std
::
string
&
publisherName
,
const
std
::
string
&
instanceName
)
const
;
int
getAvailableTimeout
()
const
;
ServicesImpl
*
m_impl
;
};
std
::
ostream
&
operator
<<
(
std
::
ostream
&
,
const
Server
&
);
...
...
src/cameo/Services.cpp
View file @
3b5be68e
...
...
@@ -40,12 +40,11 @@ Services::~Services() {
}
void
Services
::
terminate
()
{
delete
m_impl
;
m_impl
=
nullptr
;
m_impl
.
reset
();
}
void
Services
::
setImpl
(
ServicesImpl
*
impl
)
{
m_impl
=
impl
;
m_impl
.
reset
(
impl
)
;
}
std
::
vector
<
std
::
string
>
Services
::
split
(
const
std
::
string
&
info
)
{
...
...
src/cameo/Services.h
View file @
3b5be68e
...
...
@@ -52,7 +52,7 @@ public:
int
m_port
;
int
m_statusPort
;
std
::
string
m_serverStatusEndpoint
;
ServicesImpl
*
m_impl
;
std
::
unique_ptr
<
ServicesImpl
>
m_impl
;
};
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment