DescriptionAU: ApplyMap utility function
ApplyMap takes a vector<ValueType> and a map of
ValueType->ValueType. For each object in the collection that is a key
in the map, replace that element with the corresponding value in the
map.
E.g. ApplyMap({1, 2, 3, 4, 5}, {3->6, 5->7, 8->10}) changes the
collection to be: {1, 2, 6, 4, 7}.
BUG=7294
TEST=attached unittest
Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=cc92cd3
Patch Set 1 #Patch Set 2 : don't need std::set in unittest #
Total comments: 2
Patch Set 3 : fixes for review #Messages
Total messages: 3 (0 generated)
|