MCPcopy Create free account
hub / github.com/DFHack/dfhack / parseJobMaterialCategory

Method parseJobMaterialCategory

library/modules/Materials.cpp:557–571  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

555#undef TEST
556
557bool DFHack::parseJobMaterialCategory(df::job_material_category* cat, const std::string& token)
558{
559 cat->whole = 0;
560
561 std::vector<std::string> items;
562 split_string(&items, toLower_cp437(token), ",", true);
563
564 for (size_t i = 0; i < items.size(); i++)
565 {
566 if (!set_bitfield_field(cat, items[i], 1))
567 return false;
568 }
569
570 return true;
571}
572
573bool DFHack::parseJobMaterialCategory(df::dfhack_material_category* cat, const std::string& token)
574{

Callers

nothing calls this directly

Calls 4

split_stringFunction · 0.85
toLower_cp437Function · 0.85
set_bitfield_fieldFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected