diff --git a/Source/VFS/source/Native/DisplayNamesCache.mm b/Source/VFS/source/Native/DisplayNamesCache.mm index b3d6dda2e..71db90260 100644 --- a/Source/VFS/source/Native/DisplayNamesCache.mm +++ b/Source/VFS/source/Native/DisplayNamesCache.mm @@ -16,7 +16,7 @@ [[clang::no_destroy]] static ankerl::unordered_dense:: segmented_set strings; - std::lock_guard lock{mtx}; + const std::lock_guard lock{mtx}; if( auto it = strings.find(_string); it != strings.end() ) { return *it; } @@ -162,7 +162,7 @@ return std::nullopt; } else { - return *existed; + return existed; } } // FAST PATH ENDS