mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-21 13:53:11 -07:00
Removing unnecessary string copies when iterating vectors and maps in KeyGraphFeaturesInfo (#915)
This commit is contained in:
parent
6fe229fc15
commit
4f05b63ba6
1 changed files with 2 additions and 2 deletions
|
@ -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());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue