From a6bcb8c35e926a5d8965636f3561fec91880c7f7 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 8 Mar 2018 12:28:30 +0200 Subject: loplugin:constantparam in linguistic..sfx2 Change-Id: I0e8c506df0beb0b05d9c32723876b11b6577280a Reviewed-on: https://gerrit.libreoffice.org/50938 Tested-by: Jenkins Reviewed-by: Noel Grandin --- linguistic/source/misc2.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'linguistic') diff --git a/linguistic/source/misc2.cxx b/linguistic/source/misc2.cxx index 2cf31ac51dff..782d190e7a1f 100644 --- a/linguistic/source/misc2.cxx +++ b/linguistic/source/misc2.cxx @@ -41,15 +41,15 @@ using namespace com::sun::star; /// @see GetDictionaryPaths enum class DictionaryPathFlags { + NONE = 0x00, INTERNAL = 0x01, USER = 0x02, - WRITABLE = 0x04 }; namespace o3tl { - template<> struct typed_flags : is_typed_flags {}; + template<> struct typed_flags : is_typed_flags {}; } -#define PATH_FLAG_ALL (DictionaryPathFlags::INTERNAL | DictionaryPathFlags::USER | DictionaryPathFlags::WRITABLE) +#define PATH_FLAG_ALL (DictionaryPathFlags::INTERNAL | DictionaryPathFlags::USER) namespace linguistic { @@ -112,7 +112,7 @@ static std::vector< OUString > GetMultiPaths_Impl( ++nMaxEntries; aRes.resize( nMaxEntries ); sal_Int32 nCount = 0; // number of actually added entries - if ((nPathFlags & DictionaryPathFlags::WRITABLE) && !aWritablePath.isEmpty()) + if (!aWritablePath.isEmpty()) aRes[ nCount++ ] = aWritablePath; for (int i = 0; i < 2; ++i) { @@ -134,7 +134,7 @@ static std::vector< OUString > GetMultiPaths_Impl( OUString GetDictionaryWriteablePath() { - std::vector< OUString > aPaths( GetMultiPaths_Impl( "Dictionary", DictionaryPathFlags::WRITABLE ) ); + std::vector< OUString > aPaths( GetMultiPaths_Impl( "Dictionary", DictionaryPathFlags::NONE ) ); DBG_ASSERT( aPaths.size() == 1, "Dictionary_writable path corrupted?" ); OUString aRes; if (aPaths.size() > 0) -- cgit