From dae91af92db2b316cec2db17328e92306b915753 Mon Sep 17 00:00:00 2001 From: B Stack Date: Tue, 8 Dec 2020 08:13:55 -0500 Subject: add upstream 11.4 --- FreeFileSync/Source/ffs_paths.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'FreeFileSync/Source/ffs_paths.cpp') 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; } -- cgit