diff --git a/libretroshare/src/services/p3chatservice.cc b/libretroshare/src/services/p3chatservice.cc index 1010b6184..67261f9cc 100644 --- a/libretroshare/src/services/p3chatservice.cc +++ b/libretroshare/src/services/p3chatservice.cc @@ -1039,9 +1039,7 @@ void p3ChatService::statusChange(const std::list &plist) changed = true; - std::list::iterator cit1 = cit; - cit++; - privateOutgoingList.erase(cit1); + cit = privateOutgoingList.erase(cit); continue; } diff --git a/libretroshare/src/services/p3msgservice.cc b/libretroshare/src/services/p3msgservice.cc index e1f3d802b..3c5516502 100644 --- a/libretroshare/src/services/p3msgservice.cc +++ b/libretroshare/src/services/p3msgservice.cc @@ -879,9 +879,7 @@ bool p3MsgService::removeMessageTagType(uint32_t tagId) /* remove empty tag */ delete(tag); - std::map::iterator mit2 = mit1; - mit1++; - mMsgTags.erase(mit2); + mMsgTags.erase(mit1++); continue; } }