| 240 | |
| 241 | |
| 242 | void Micropolis::setCityName(const std::string &name) |
| 243 | { |
| 244 | std::string cleanName; |
| 245 | |
| 246 | int i; |
| 247 | int n = name.length(); |
| 248 | for (i = 0; i < n; i++) { |
| 249 | char ch = name[i]; |
| 250 | if (!isalnum(ch)) { |
| 251 | ch = '_'; |
| 252 | } |
| 253 | cleanName.push_back(ch); |
| 254 | } |
| 255 | |
| 256 | setCleanCityName(cleanName); |
| 257 | } |
| 258 | |
| 259 | |
| 260 | /** |
nothing calls this directly
no outgoing calls
no test coverage detected