| 501 | } |
| 502 | |
| 503 | int toint(const std::string &str, int failValue = 0) |
| 504 | { |
| 505 | std::istringstream ss(str); |
| 506 | int valInt; |
| 507 | ss >> valInt; |
| 508 | if (ss.fail()) |
| 509 | { |
| 510 | return failValue; |
| 511 | } |
| 512 | return valInt; |
| 513 | } |
| 514 | |
| 515 | bool tryShape(std::string value, TileType &paint) |
| 516 | { |