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

Function parseFilterId

plugins/debug.cpp:691–706  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

689}
690
691static FilterManager::iterator parseFilterId(color_ostream& out,
692 const std::string& parameter)
693{
694 unsigned long id = 0;
695 try {
696 id = std::stoul(parameter);
697 } catch(...) {
698 }
699 auto& filMan = FilterManager::getInstance();
700 auto iter = filMan.find(id);
701 if (iter == filMan.end()) {
702 WARN(command,out) << "The optional parameter ("
703 << parameter << ") must be an filter id." << std::endl;
704 }
705 return iter;
706}
707
708static void printFilterListEntry(color_ostream& out,
709 unsigned line,

Callers 2

listFiltersFunction · 0.85
applyFilterIdsFunction · 0.85

Calls 2

findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected