diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-10-01 15:03:54 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-10-01 17:35:08 +0200 |
commit | 4281abdfa8a417f7ba47c466410e1cbfed4342e0 (patch) | |
tree | e63ad9c555ef59f0c4d46a4b394d8c27ce6b70ef /sd/source/ui/tools/EventMultiplexer.cxx | |
parent | unotest: the assigned value is never used (diff) | |
download | core-4281abdfa8a417f7ba47c466410e1cbfed4342e0.tar.gz core-4281abdfa8a417f7ba47c466410e1cbfed4342e0.zip |
sd: std::auto_ptr -> std::unique_ptr
ToolBarManager::Implementation::Update in sd/source/ui/view/ToolBarManager.cxx
is dubious. It takes its parameter by value (so in UnlockUpdate() the passed-in
mpSynchronousLayouterLock is reset upon passing it in), but the comment that it
"is [...] released at its end" together with the redundant
pLocalLayouterLock.reset() at the end of Update() make it look as though the
intention was to pass by reference. However, resetting
mpSynchronousLayouterLock even in the case where pass-by-ref would fail to reset
it is apparently important, as otherwise e.g. JunitTest_svx_unoapi would run
into the OSL_ASSERT(mpSynchronousLayouterLock.get()==NULL) in LockUpdate() with
a call stack of ... -> Update -> SetValid -> UpdateLockImplementation ->
LockUpdate.
Change-Id: I7d2717d5e1f8aa69c79a626c100d7fefb0cfb120
Diffstat (limited to 'sd/source/ui/tools/EventMultiplexer.cxx')
-rw-r--r-- | sd/source/ui/tools/EventMultiplexer.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sd/source/ui/tools/EventMultiplexer.cxx b/sd/source/ui/tools/EventMultiplexer.cxx index 8549a749834c..ede1c01f2abb 100644 --- a/sd/source/ui/tools/EventMultiplexer.cxx +++ b/sd/source/ui/tools/EventMultiplexer.cxx @@ -176,7 +176,7 @@ EventMultiplexer::~EventMultiplexer (void) mpImpl->dispose(); // Now we call release twice. One decreases the use count of the // implementation object (if all goes well to zero and thus deletes - // it.) The other releases the auto_ptr and prevents the + // it.) The other releases the unique_ptr and prevents the // implementation object from being deleted a second time. mpImpl->release(); mpImpl.release(); |