summaryrefslogtreecommitdiff
path: root/FreeFileSync/Source/ffs_paths.cpp
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2020-12-08 13:14:11 +0000
committerB Stack <bgstack15@gmail.com>2020-12-08 13:14:11 +0000
commit35adf35f7d3b7744d58d7ff27fcaf1bb843060aa (patch)
tree8e5414c3b8a914f57a1d4dc92ee0e55ae1f6e9ee /FreeFileSync/Source/ffs_paths.cpp
parentMerge branch '11.3' into 'master' (diff)
parentadd upstream 11.4 (diff)
downloadFreeFileSync-35adf35f7d3b7744d58d7ff27fcaf1bb843060aa.tar.gz
FreeFileSync-35adf35f7d3b7744d58d7ff27fcaf1bb843060aa.tar.bz2
FreeFileSync-35adf35f7d3b7744d58d7ff27fcaf1bb843060aa.zip
Merge branch '11.4' into 'master'11.4
add upstream 11.4 See merge request opensource-tracking/FreeFileSync!28
Diffstat (limited to 'FreeFileSync/Source/ffs_paths.cpp')
-rw-r--r--FreeFileSync/Source/ffs_paths.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/FreeFileSync/Source/ffs_paths.cpp b/FreeFileSync/Source/ffs_paths.cpp
index e728c54b..3b058270 100644
--- a/FreeFileSync/Source/ffs_paths.cpp
+++ b/FreeFileSync/Source/ffs_paths.cpp
@@ -43,16 +43,11 @@ Zstring getProcessParentFolderPath()
-namespace
-{
-//don't make this a function-scope static (avoid code-gen for "magic static")
//getFfsVolumeId() might be called during static destruction, e.g. async update check
-std::once_flag onceFlagGetFfsVolumeId;
-}
-
VolumeId fff::getFfsVolumeId() //throw FileError
{
static VolumeId volumeId; //POD => no "magic static" code gen
+ static constinit2 std::once_flag onceFlagGetFfsVolumeId; //=> no "magic static" code gen
std::call_once(onceFlagGetFfsVolumeId, [] { volumeId = getVolumeId(getProcessPath()); }); //throw FileError
return volumeId;
}
bgstack15