File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -155,17 +155,16 @@ Dictionary::Iterator Dictionary::End()
155155 * Removes the item specified by the iterator from the dictionary.
156156 *
157157 * @param it The iterator.
158- * @return an iterator to the element after the removed element.
159158 */
160- Dictionary::Iterator Dictionary::Remove (Dictionary::Iterator it)
159+ void Dictionary::Remove (Dictionary::Iterator it)
161160{
162161 ASSERT (OwnsLock ());
163162 std::unique_lock<std::shared_timed_mutex> lock (m_DataMutex);
164163
165164 if (m_Frozen)
166165 BOOST_THROW_EXCEPTION (std::invalid_argument (" Dictionary must not be modified." ));
167166
168- return m_Data.erase (it);
167+ m_Data.erase (it);
169168}
170169
171170/* *
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ class Dictionary final : public Object
5656
5757 void Remove (const String& key);
5858
59- Iterator Remove (Iterator it);
59+ void Remove (Iterator it);
6060
6161 void Clear ();
6262
Original file line number Diff line number Diff line change @@ -580,10 +580,10 @@ void ApiListener::PruneDeletedRuntimeObjects()
580580
581581 for (auto it = deletedRuntimeObjects->Begin (); it != deletedRuntimeObjects->End ();) {
582582 if (it->second < cutoff) {
583- it = deletedRuntimeObjects->Remove (it);
583+ deletedRuntimeObjects->Remove (it++ );
584584 } else {
585- it++ ;
586- };
585+ ++it ;
586+ }
587587 }
588588}
589589
You can’t perform that action at this time.
0 commit comments