bool ScriptHandler::LogInfo::find(pstring what) { if (what[0] == '*') what.remove(0, 1); what.toupper(); replace_ascii(what, '/', '\\'); return logged.find(what) != logged.end(); }
void ScriptHandler::LogInfo::add(pstring what) { if (what[0] == '*') what.remove(0, 1); what.toupper(); replace_ascii(what, '/', '\\'); if (logged.find(what) == logged.end()) { logged.insert(what); ordered.push_back(&(*logged.find(what))); } }
ScriptHandler::LabelInfo::iterator ScriptHandler::findLabel(pstring label) { if (label[0] == '*') label.remove(0, 1); label.tolower(); LabelInfo::dic::iterator e = label_names.find(label); if (e != label_names.end()) return e->second; errorAndExit("Label \"" + label + "\" is not found."); return label_info.end(); // dummy }