diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-11-22 08:52:59 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-11-22 12:07:54 +0100 |
commit | 85acc270fc670443cd700c471d9b495e12d4e6dc (patch) | |
tree | 59172f6ee9a51d92548dc64735946b4fcd2a3f7d /sal/rtl/hash.cxx | |
parent | eea439b4b1305449616e8d0d368f3ccff1a7eca9 (diff) |
improve function-local statics in sal
Change-Id: I0853cf13162bae44cf8a5c44a4546a73f05772d9
Reviewed-on: https://gerrit.libreoffice.org/63780
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sal/rtl/hash.cxx')
-rw-r--r-- | sal/rtl/hash.cxx | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/sal/rtl/hash.cxx b/sal/rtl/hash.cxx index e12095f3d9e5..489030f62861 100644 --- a/sal/rtl/hash.cxx +++ b/sal/rtl/hash.cxx @@ -40,12 +40,7 @@ static void rtl_str_hash_free(StringHashTable *pHash); static StringHashTable * getHashTable() { - static StringHashTable *pInternPool = nullptr; - if (!pInternPool) - { - static StringHashTable* pHash = rtl_str_hash_new(1024); - pInternPool = pHash; - } + static StringHashTable* pInternPool = rtl_str_hash_new(1024); return pInternPool; } |