MCPcopy Create free account
hub / github.com/apache/impala / EmplaceValuesFromMap

Function EmplaceValuesFromMap

be/src/gutil/map-util.h:867–877  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

865
866template <class MapContainer, class ValueContainer>
867void EmplaceValuesFromMap(MapContainer&& map_container,
868 ValueContainer* value_container) {
869 CHECK(value_container != nullptr);
870 // See AppendKeysFromMap for why this is done.
871 if (value_container->empty()) {
872 value_container->reserve(map_container.size());
873 }
874 for (auto&& entry : map_container) {
875 value_container->emplace_back(std::move(entry.second));
876 }
877}
878
879// A more specialized overload of AppendValuesFromMap to optimize reallocations
880// for the common case in which we're appending values to a vector and hence

Callers 1

AppendValuesFromMapFunction · 0.85

Calls 4

moveFunction · 0.85
reserveMethod · 0.80
emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected