[PATCH 2/2] simplify/clarify code

Lionel Elie Mamane lionel at mamane.lu
Tue May 15 09:37:43 PDT 2012


---
 dbaccess/source/core/api/KeySet.cxx |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx
index 49edcbf..26112cf 100644
--- a/dbaccess/source/core/api/KeySet.cxx
+++ b/dbaccess/source/core/api/KeySet.cxx
@@ -1105,15 +1105,12 @@ sal_Bool SAL_CALL OKeySet::next(  ) throw(SQLException, RuntimeException)
 
     if(isAfterLast())
         return sal_False;
+    ++m_aKeyIter;
     if(!m_bRowCountFinal) // not yet all records fetched
     {
-        ++m_aKeyIter; // this is possible because we stand on begin() and this is the "beforefirst" row
-                      // LEM: above comment is wrong; we may be anywhere but after last.
         if(m_aKeyIter == m_aKeyMap.end() && !fetchRow())
             m_aKeyIter = m_aKeyMap.end();
     }
-    else if(!isAfterLast())
-        ++m_aKeyIter;
 
     refreshRow();
     return !isAfterLast();
-- 
1.7.7.3


--YiEDa0DAkWCtVeE4--


More information about the LibreOffice mailing list