MCPcopy Create free account
hub / github.com/chronoxor/FastBinaryEncoding / AddImport

Method AddImport

source/fbe.cpp:176–189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174}
175
176void Import::AddImport(std::string* i)
177{
178 if (i == nullptr)
179 yyerror("Import is null!");
180 if (i->empty())
181 yyerror("Import package is invalid!");
182
183 // Check for duplicates
184 auto it = std::find_if(imports.begin(), imports.end(), [i](auto item)->bool { return *item.get() == *i; });
185 if (it != imports.end())
186 yyerror("Duplicate import package " + *i);
187
188 imports.push_back(std::shared_ptr<std::string>(i));
189}
190
191Version::Version(const std::string& v)
192{

Callers

nothing calls this directly

Calls 5

beginMethod · 0.80
endMethod · 0.80
push_backMethod · 0.80
emptyMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected