-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cleanup singleton #1685
Cleanup singleton #1685
Conversation
8438b13
to
66b4179
Compare
doc/release/v3_0_0.md
Outdated
@@ -123,12 +123,17 @@ New Features | |||
[C++11 Mutex concept](http://en.cppreference.com/w/cpp/concept/Mutex). | |||
* Added a Timer class to execute a static or member function in a separate | |||
thread after a period x, every y milliseconds, for z times or w seconds. | |||
* `yarp::os::Carriers` `yarp::os::LogForwarder` singleton c++11-fied. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know I'm usually annoying on this, but this is the kind of changes that has no impact at all on the user, therefore I believe it would be better not to mention it on the changelog...
src/libYARP_init/src/CustomInit.cpp
Outdated
{ | ||
yarp::os::LogForwarder::clearInstance(); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yarpCustomFini() has been there since the origin of YARP, probably for a symmetry reason, see
yarp/src/libYARP_init/src/CustomInit.cpp
Lines 33 to 34 in ea3403b
extern "C" void yarpCustomFini() { | |
} |
Also the LogForwarder should have never been initialized there, the right place would be finiMinimum, this call is supposed to be there for initializing stuff initialized in yarpCustomInit.
Anyway, I'd rather just remove the yarp::os::LogForwarder::clearInstance();
call for now and restore the original empty body of the call (the compiler will probably optimize it anyway...)
66b4179
to
7723709
Compare
👍 done |
This PR c++11-fy all(?) the singletons in
yarp
.Please review code.