diff --git a/src/eepp/ui/doc/syntaxcolorscheme.cpp b/src/eepp/ui/doc/syntaxcolorscheme.cpp index dafb9af8e..9d1aa58d8 100644 --- a/src/eepp/ui/doc/syntaxcolorscheme.cpp +++ b/src/eepp/ui/doc/syntaxcolorscheme.cpp @@ -275,7 +275,7 @@ SyntaxColorScheme::SyntaxColorScheme( const std::string& name, mStorage( std::make_shared( Storage{ name, syntaxColors, editorColors } ) ) {} void SyntaxColorScheme::ensureUniqueStorage() { - if ( !mStorage.unique() ) + if ( mStorage.use_count() != 1 ) mStorage = std::make_shared( *mStorage ); mStyleCache.clear(); } diff --git a/src/eepp/ui/keyboardshortcut.cpp b/src/eepp/ui/keyboardshortcut.cpp index 83d9a5536..aa986b2b9 100644 --- a/src/eepp/ui/keyboardshortcut.cpp +++ b/src/eepp/ui/keyboardshortcut.cpp @@ -45,7 +45,7 @@ void KeyBindings::setKeybinds( const KeyBindings& bindings ) { } void KeyBindings::ensureUniqueStorage() { - if ( !mStorage.unique() ) + if ( mStorage.use_count() != 1 ) mStorage = std::make_shared( *mStorage ); }