Removing unnecessary string copies when iterating vectors and maps in KeyGraphFeaturesInfo (#915)
This commit is contained in:
		
				
					committed by
					
						
						Matt Cooley
					
				
			
			
				
	
			
			
			
						parent
						
							6fe229fc15
						
					
				
				
					commit
					4f05b63ba6
				
			@@ -20,7 +20,7 @@ IObservableVector<String ^> ^ KeyGraphFeaturesInfo::ConvertWStringVector(vector<
 | 
			
		||||
{
 | 
			
		||||
    auto outVector = ref new Vector<String ^>();
 | 
			
		||||
 | 
			
		||||
    for (auto v : inVector)
 | 
			
		||||
    for (const auto& v : inVector)
 | 
			
		||||
    {
 | 
			
		||||
        outVector->Append(ref new String(v.c_str()));
 | 
			
		||||
    }
 | 
			
		||||
@@ -32,7 +32,7 @@ IObservableMap<String ^, String ^> ^ KeyGraphFeaturesInfo::ConvertWStringIntMap(
 | 
			
		||||
{
 | 
			
		||||
    Map<String ^, String ^> ^ outMap = ref new Map<String ^, String ^>();
 | 
			
		||||
    ;
 | 
			
		||||
    for (auto m : inMap)
 | 
			
		||||
    for (const auto& m : inMap)
 | 
			
		||||
    {
 | 
			
		||||
        outMap->Insert(ref new String(m.first.c_str()), m.second.ToString());
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user