[Kmymoney-devel] Patch-Review

Thomas Baumgart thb at net-bembel.de
Tue Feb 16 09:10:13 CET 2010


Hi,

I want to apply the following change, which in my eyes is necessary. Reason: 
In the the line

  t_it = schedule.erase(t_it);

is executed, but t_it != schedule.end(), t_it get incremented which is false.

The continue statement immediately goes to the loop-termination expression in 
that case, which should quit the loop in case of t_it == schedule.end() 
anyway.

Comments welcome.


Index: khomeview.cpp
===================================================================
--- khomeview.cpp       (revision 1090614)
+++ khomeview.cpp       (working copy)
@@ -449,10 +449,7 @@
         //if nextDueDate is still currentDate then remove it from scheduled 
payments
         if ((*t_it).nextDueDate() == QDate::currentDate()) {
           t_it = schedule.erase(t_it);
-
-          //break it that was the last schedule
-          if (t_it == schedule.end())
-            break;
+          continue;
         }
       }
       ++t_it;

-- 

Regards

Thomas Baumgart

GPG-FP: E55E D592 F45F 116B 8429   4F99 9C59 DB40 B75D D3BA
-------------------------------------------------------------
Person A: It's an ISO standard.
Person B: ...And that means what?
 --mal (http://theangryadmin.blogspot.com/2008/04/future.html)
-------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 224 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/kmymoney-devel/attachments/20100216/d469669d/attachment.sig 


More information about the KMyMoney-devel mailing list