| 160 | } |
| 161 | |
| 162 | int ScriptParams::ASGetInt(const std::string &key) { |
| 163 | ScriptParamMap::iterator iter = parameter_map_.find(key); |
| 164 | int ret_val = -1; |
| 165 | if (iter != parameter_map_.end()) { |
| 166 | const ScriptParam &sp = iter->second; |
| 167 | ret_val = sp.GetInt(); |
| 168 | } else { |
| 169 | DisplayError("Error", ("No parameter \"" + key + "\" of correct type.").c_str()); |
| 170 | } |
| 171 | return ret_val; |
| 172 | } |
| 173 | |
| 174 | void ScriptParams::ASRemove(const std::string &key) { |
| 175 | parameter_map_.erase(key); |
no test coverage detected