diff options
author | Daniel Wilhelm <daniel@wili.li> | 2015-10-02 14:56:27 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2015-10-02 14:56:27 +0200 |
commit | 19eb73ff543c81c6886725a20dea0060cb0c0c26 (patch) | |
tree | 91442c0fdb9cac90c75dfb6bb84def9df297cd77 /zen/format_unit.cpp | |
parent | 7.2 (diff) | |
download | FreeFileSync-19eb73ff543c81c6886725a20dea0060cb0c0c26.tar.gz FreeFileSync-19eb73ff543c81c6886725a20dea0060cb0c0c26.tar.bz2 FreeFileSync-19eb73ff543c81c6886725a20dea0060cb0c0c26.zip |
7.3
Diffstat (limited to 'zen/format_unit.cpp')
-rw-r--r-- | zen/format_unit.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/zen/format_unit.cpp b/zen/format_unit.cpp index 5f529f9c..9624458c 100644 --- a/zen/format_unit.cpp +++ b/zen/format_unit.cpp @@ -190,7 +190,10 @@ public: private: static const IntegerFormat& getInst() { - static IntegerFormat inst; //not threadsafe in MSVC until C++11, but not required right now +#if defined _MSC_VER && _MSC_VER < 1900 +#error function scope static initialization is not yet thread-safe! +#endif + static IntegerFormat inst; return inst; } @@ -276,14 +279,6 @@ std::wstring zen::ffs_Impl::includeNumberSeparator(const std::wstring& number) } -#ifdef ZEN_WIN -namespace -{ -const bool useNewLocalTimeCalculation = zen::vistaOrLater(); -} -#endif - - std::wstring zen::utcToLocalTimeString(std::int64_t utcTime) { auto errorMsg = [&] { return _("Error") + L" (time_t: " + numberTo<std::wstring>(utcTime) + L")"; }; @@ -293,6 +288,11 @@ std::wstring zen::utcToLocalTimeString(std::int64_t utcTime) SYSTEMTIME systemTimeLocal = {}; +#if defined _MSC_VER && _MSC_VER < 1900 +#error function scope static initialization is not yet thread-safe! +#endif + static const bool useNewLocalTimeCalculation = zen::vistaOrLater(); + //http://msdn.microsoft.com/en-us/library/ms724277(VS.85).aspx if (useNewLocalTimeCalculation) //DST conversion like in Windows 7: NTFS stays fixed, but FAT jumps by one hour { |