MCPcopy Create free account
hub / github.com/Snapchat/Valdi / addArgument

Method addArgument

valdi/src/valdi/standalone_runtime/ArgumentsParser.cpp:131–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129ArgumentsParser::~ArgumentsParser() = default;
130
131Ref<Argument> ArgumentsParser::addArgument(std::string_view name) {
132 auto key = StringCache::getGlobal().makeString(name);
133 auto argument = makeShared<Argument>(key);
134
135 SC_ASSERT(getArgument(key) == nullptr);
136 _argumentsByName[key] = argument;
137 _arguments.emplace_back(argument);
138
139 return argument;
140}
141
142Ref<Argument> ArgumentsParser::getArgument(const StringBox& name) const {
143 const auto& it = _argumentsByName.find(name);

Callers 7

precompileFunction · 0.80
imageInfoFunction · 0.80
imageConvertFunction · 0.80
pngquantFunction · 0.80
rewriteHeaderFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80

Calls 2

getGlobalFunction · 0.85
makeStringMethod · 0.80

Tested by

no test coverage detected