diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-04-16 09:35:16 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-04-16 09:42:12 +0200 |
commit | 74b6e61dde64c5e24bffacda6f67dbf3d1fc7032 (patch) | |
tree | 08df4233aa078ff19312d093bb4f8acd5b806e7a | |
parent | d07fc485d46f431405a3f6a002f951a08c559677 (diff) |
-Werror,-Wreturn-std-move (recent Clang trunk)
An explicit std::move would be needed in the return statements, as there's a
conversion from VclPtrInstance to base class VclPtr involved. One more reason
to better get rid of VclPtrInstance completely in favor of VclPtr::Create, as
already mentioned in
<https://lists.freedesktop.org/archives/libreoffice/2017-May/077756.html>
"VclPtr some improvements ?"
Change-Id: Id96a58b425749b9be07b422bb4161a3af864ff6c
-rw-r--r-- | sfx2/source/dialog/infobar.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/sidebar/SidebarController.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sfx2/source/dialog/infobar.cxx b/sfx2/source/dialog/infobar.cxx index 2946a5da5aac..d552a4d637a2 100644 --- a/sfx2/source/dialog/infobar.cxx +++ b/sfx2/source/dialog/infobar.cxx @@ -327,7 +327,7 @@ VclPtr<SfxInfoBarWindow> SfxInfoBarContainerWindow::appendInfoBar(const OUString { Size aSize = GetSizePixel(); - VclPtrInstance<SfxInfoBarWindow> pInfoBar(this, sId, sMessage, ibType, nMessageStyle); + auto pInfoBar = VclPtr<SfxInfoBarWindow>::Create(this, sId, sMessage, ibType, nMessageStyle); basegfx::BColor aBackgroundColor; basegfx::BColor aForegroundColor; diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx index c7652bdf9e52..b205559c6326 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -961,7 +961,7 @@ VclPtr<PopupMenu> SidebarController::CreatePopupMenu ( const ::std::vector<TabBar::DeckMenuData>& rMenuData) const { // Create the top level popup menu. - VclPtrInstance<PopupMenu> pMenu; + auto pMenu = VclPtr<PopupMenu>::Create(); FloatingWindow* pMenuWindow = dynamic_cast<FloatingWindow*>(pMenu->GetWindow()); if (pMenuWindow != nullptr) { |