diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2019-07-30 13:35:39 +1000 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2019-08-01 11:21:36 +0200 |
commit | bf6bde2da134dad60ecbf8f3e97674abadb7349e (patch) | |
tree | bc1e6466b8c193d9e2fd2a1b30b70557daf70ea3 /sal/rtl/alloc_cache.cxx | |
parent | 6eefac3b3744f806b0a35afbd0d9669d840118f4 (diff) |
Unify some code across platforms to use static initializers
Static initializers were used for the environment strings since
commit d19c40f45dc8e8bcd9db4c6b83bdcf6367f6fbe7 to workaround
thread-unsafe getenv. The special case for Android was initially
introduced in commit 60628799633ffde502cb105b98d3f254f93115aa,
to allow modifying the environment in the code; then was fixed
in commit 4fbf6df784529d48cf194a2d9c495ffb47933d59. That was
relying on the functions being called each time their results
were used. But commit 9f027559557cb132835d8a13cdc0281ad4e757ae
changed that, making the results static, thus only calling the
functions once on all platforms.
This was effective more than a year already, so presumably the
special-casing for Android isn't needed anymore. Thus, this patch
unifies all platforms to use the same approach (calling getenv
once, storing copies of result in static variables.
Also this stores flags used in maybeOutputTimestamp to static
variables, too, to avoid parsing strings each time the function
is called.
Change-Id: I84bdbfb900c15b407fb555296d2613bd3d62da7e
Reviewed-on: https://gerrit.libreoffice.org/76573
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sal/rtl/alloc_cache.cxx')
0 files changed, 0 insertions, 0 deletions