diff options
author | Mariusz Dykierek <mariuszdykierek@gmail.com> | 2012-02-16 12:20:09 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-02-16 12:24:33 +0000 |
commit | 77eaa51bc47ff6b02f319053d4ca5aaf37b28f37 (patch) | |
tree | a323fc8d59b0224094b6261754cada2ba897a1cf /linguistic/source | |
parent | 7212cc8081216a3b7d626dc81be077d0522e3737 (diff) |
possible inefficient checking for emptiness
Diffstat (limited to 'linguistic/source')
-rw-r--r-- | linguistic/source/dlistimp.cxx | 4 | ||||
-rw-r--r-- | linguistic/source/dlistimp.hxx | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/linguistic/source/dlistimp.cxx b/linguistic/source/dlistimp.cxx index e82488887c0c..316d86ddcc92 100644 --- a/linguistic/source/dlistimp.cxx +++ b/linguistic/source/dlistimp.cxx @@ -608,7 +608,7 @@ void SAL_CALL pDicEvtLstnrHelper->DisposeAndClear( aEvtObj ); //! avoid creation of dictionaries if not already done - if (aDicList.size() > 0) + if ( !aDicList.empty() ) { DictionaryVec_t& rDicList = GetOrCreateDicList(); size_t nCount = rDicList.size(); @@ -720,7 +720,7 @@ void DicList::SaveDics() { // save dics only if they have already been used/created. //! don't create them just for the purpose of saving them ! - if (aDicList.size() > 0) + if ( !aDicList.empty() ) { // save (modified) dictionaries DictionaryVec_t& rDicList = GetOrCreateDicList(); diff --git a/linguistic/source/dlistimp.hxx b/linguistic/source/dlistimp.hxx index 4eb9a1a0f559..b4de818557ef 100644 --- a/linguistic/source/dlistimp.hxx +++ b/linguistic/source/dlistimp.hxx @@ -89,7 +89,7 @@ class DicList : void _CreateDicList(); DictionaryVec_t & GetOrCreateDicList() { - if (!bInCreation && aDicList.size() == 0) + if ( !bInCreation && aDicList.empty() ) _CreateDicList(); return aDicList; } |