From c08f8abc98ef057628de7865e72b26fae9284988 Mon Sep 17 00:00:00 2001 From: wmayer Date: Mon, 25 Feb 2013 11:57:11 +0100 Subject: [PATCH] Fix build error on MacOSX --- src/App/Transactions.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/App/Transactions.cpp b/src/App/Transactions.cpp index ef4ac203a..f61b97be9 100644 --- a/src/App/Transactions.cpp +++ b/src/App/Transactions.cpp @@ -234,13 +234,16 @@ void TransactionObject::applyChn(Document & /*Doc*/, DocumentObject * /*pcObj*/, { if (status == New || status == Chn) { // apply changes if any - if(!Forward){ + if (!Forward) { std::map::const_reverse_iterator It; - for (It=_PropChangeMap.rbegin();It!=_PropChangeMap.rend();++It) + std::map::const_reverse_iterator rendIt = _PropChangeMap.rend(); + for (It = _PropChangeMap.rbegin(); It != rendIt; ++It) const_cast(It->first)->Paste(*(It->second)); - }else{ + } + else { std::map::const_iterator It; - for (It=_PropChangeMap.begin();It!=_PropChangeMap.end();++It) + std::map::const_iterator endIt = _PropChangeMap.end(); + for (It = _PropChangeMap.begin(); It != endIt; ++It) const_cast(It->first)->Paste(*(It->second)); } }