mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 12:50:06 +00:00 
			
		
		
		
	Use std::vector::erase instead of self written code in remove_marker
This commit is contained in:
		
							parent
							
								
									491a33794f
								
							
						
					
					
						commit
						534b679d63
					
				
					 1 changed files with 1 additions and 6 deletions
				
			
		|  | @ -229,12 +229,7 @@ void MarkerManager::remove_marker(size_t index) | |||
|       return; | ||||
|    } | ||||
| 
 | ||||
|    for (size_t i = index; i < p->markerRecords_.size() - 1; i++) | ||||
|    { | ||||
|       p->markerRecords_[i] = p->markerRecords_[i + 1]; | ||||
|    } | ||||
| 
 | ||||
|    p->markerRecords_.pop_back(); | ||||
|    p->markerRecords_.erase(std::next(p->markerRecords_.begin(), index)); | ||||
| 
 | ||||
|    Q_EMIT MarkerRemoved(index); | ||||
|    Q_EMIT MarkersUpdated(); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 AdenKoperczak
						AdenKoperczak