summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-08-01 15:15:28 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-08-01 20:07:55 +0200
commit9496e3d2ac42ae6e5a0ab4299eb388c47a92effd (patch)
treedb55dca2235f5b54972f8f737245c99bda8a22c8
parentb47a8f091ad8f9048a6b7962e9cde5d04ea0d665 (diff)
skip some indirection
these don't need to use std::unique_ptr Change-Id: I03140c7957fd59443db932c37890a6742c6d3bec Reviewed-on: https://gerrit.libreoffice.org/76800 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--compilerplugins/clang/badstatics.cxx2
-rw-r--r--vcl/source/graphic/Manager.cxx4
-rw-r--r--vcl/source/window/window.cxx4
3 files changed, 5 insertions, 5 deletions
diff --git a/compilerplugins/clang/badstatics.cxx b/compilerplugins/clang/badstatics.cxx
index 87c31acd996e..1c099a14236a 100644
--- a/compilerplugins/clang/badstatics.cxx
+++ b/compilerplugins/clang/badstatics.cxx
@@ -205,7 +205,7 @@ public:
.Class("ScAddInListener").GlobalNamespace()) // not owning
|| (loplugin::DeclCheck(pVarDecl).Var("maThreadSpecific")
.Class("ScDocument").GlobalNamespace()) // not owning
- || name == "s_pLOKWindowsMap" // LOK only, guarded by assert, and LOK never tries to perform a VCL cleanup
+ || name == "s_aLOKWindowsMap" // LOK only, guarded by assert, and LOK never tries to perform a VCL cleanup
|| name == "gStaticManager" // vcl/source/graphic/Manager.cxx - stores non-owning pointers
|| name == "aThreadedInterpreterPool" // ScInterpreterContext(Pool), not owning
|| name == "aNonThreadedInterpreterPool" // ScInterpreterContext(Pool), not owning
diff --git a/vcl/source/graphic/Manager.cxx b/vcl/source/graphic/Manager.cxx
index 1370b15c0811..ec2bdca9be0b 100644
--- a/vcl/source/graphic/Manager.cxx
+++ b/vcl/source/graphic/Manager.cxx
@@ -54,8 +54,8 @@ void setupConfigurationValuesIfPossible(sal_Int64& rMemoryLimit,
Manager& Manager::get()
{
- static std::unique_ptr<Manager> gStaticManager(new Manager);
- return *gStaticManager;
+ static Manager gStaticManager;
+ return gStaticManager;
}
Manager::Manager()
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index daf5674ce5d7..88ea0087a1f8 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -3161,9 +3161,9 @@ LOKWindowsMap& GetLOKWindowsMap()
assert(comphelper::LibreOfficeKit::isActive());
// Map to remember the LOKWindowId <-> Window binding.
- static std::unique_ptr<LOKWindowsMap> s_pLOKWindowsMap(new LOKWindowsMap);
+ static LOKWindowsMap s_aLOKWindowsMap;
- return *s_pLOKWindowsMap;
+ return s_aLOKWindowsMap;
}
}