diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2017-05-23 20:52:02 -0400 |
---|---|---|
committer | Kohei Yoshida <libreoffice@kohei.us> | 2017-05-25 05:27:27 +0200 |
commit | 50fc62ce76bc51f18b16eae937761d0a8872df3e (patch) | |
tree | 58244136e00d0e880032ada13fae76077e81757f /svl | |
parent | 6d51bb3d54ac52e4870bd00a21fce3a3b1c5010b (diff) |
tdf#107945: Perhaps this will make this method thread-safe...
Assuming that rtl_uString_new() is thread-safe, and static variable
initialization is technically thread-safe, hopefully we can declare
this static method thread-safe now.
Change-Id: Ibc3685a576c2a6692bdf2beff79592290b42cc8a
Reviewed-on: https://gerrit.libreoffice.org/38011
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/misc/sharedstring.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/svl/source/misc/sharedstring.cxx b/svl/source/misc/sharedstring.cxx index 9235783ce774..28f6473d0377 100644 --- a/svl/source/misc/sharedstring.cxx +++ b/svl/source/misc/sharedstring.cxx @@ -15,7 +15,7 @@ SharedString SharedString::getEmptyString() { // unicode string array for empty string is globally shared in OUString. // Let's take advantage of that. - rtl_uString* pData = nullptr; + static rtl_uString* pData = nullptr; rtl_uString_new(&pData); return SharedString(pData, pData); } |