MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / transformedMapValues

Function transformedMapValues

source/game/StarQuestDescriptor.cpp:299–302  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

297 typename ArgType = typename FunctionTraits<Fun>::template Arg<0>,
298 typename RetType = typename FunctionTraits<Fun>::Return>
299StringMap<RetType> transformedMapValues(StringMap<ArgType> const& map, Fun fun) {
300 return StringMap<RetType>::from(map.pairs().transformed(
301 [fun](pair<String, ArgType> entry) { return make_pair(entry.first, fun(entry.second)); }));
302}
303
304StringMap<String> questParamTags(StringMap<QuestParam> const& parameters) {
305 return transformedMapValues(parameters, questParamText);

Callers 5

questParamTagsFunction · 0.85
questParamsFromJsonFunction · 0.85
questParamsDiskLoadFunction · 0.85
questParamsToJsonFunction · 0.85
questParamsDiskStoreFunction · 0.85

Calls 2

transformedMethod · 0.45
pairsMethod · 0.45

Tested by

no test coverage detected