File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -808,11 +808,11 @@ void KernelDevice::_discard_thread(uint64_t tid)
808808 // It will also allow threads to finish in a timely manner.
809809 constexpr unsigned MAX_LOCAL_DISCARD = 32 ;
810810 unsigned count = 0 ;
811- for (auto p = discard_queued.begin ();
812- p != discard_queued.end () && count < MAX_LOCAL_DISCARD;
813- ++p, ++count) {
814- discard_processing.insert (p .get_start (), p .get_len ());
815- discard_queued.erase (p );
811+ for (auto it = discard_queued.begin ();
812+ it != discard_queued.end () && count < MAX_LOCAL_DISCARD;
813+ ++count) {
814+ discard_processing.insert (it .get_start (), it .get_len ());
815+ it = discard_queued.erase (it );
816816 }
817817
818818 // there are multiple active threads -> must use a counter instead of a flag
Original file line number Diff line number Diff line change @@ -657,9 +657,9 @@ class interval_set {
657657 std::swap (_size, other._size );
658658 }
659659
660- void erase (const iterator &i) {
660+ iterator erase (const iterator &i) {
661661 _size -= i.get_len ();
662- m.erase (i._iter );
662+ return iterator ( m.erase (i._iter ) );
663663 }
664664
665665 void erase (T val) {
You can’t perform that action at this time.
0 commit comments