| 148 | } |
| 149 | |
| 150 | float ScriptParams::ASGetFloat(const std::string &key) { |
| 151 | ScriptParamMap::iterator iter = parameter_map_.find(key); |
| 152 | float ret_val = -1.0f; |
| 153 | if (iter != parameter_map_.end()) { |
| 154 | const ScriptParam &sp = iter->second; |
| 155 | ret_val = sp.GetFloat(); |
| 156 | } else { |
| 157 | DisplayError("Error", ("No parameter \"" + key + "\" of correct type.").c_str()); |
| 158 | } |
| 159 | return ret_val; |
| 160 | } |
| 161 | |
| 162 | int ScriptParams::ASGetInt(const std::string &key) { |
| 163 | ScriptParamMap::iterator iter = parameter_map_.find(key); |
no test coverage detected