| 240 | } |
| 241 | |
| 242 | bool LoadTextRetryable(void *&mem, |
| 243 | const std::string &path, |
| 244 | const std::string type) { |
| 245 | char abs_path[kPathSize]; |
| 246 | bool retry = true; |
| 247 | if (FindFilePath(path.c_str(), abs_path, kPathSize, kDataPaths | kModPaths | kAbsPath) == -1) { |
| 248 | ErrorResponse err; |
| 249 | while (retry) { |
| 250 | err = DisplayError("Error", |
| 251 | (type + " file \"" + path + "\" did not load correctly.").c_str(), |
| 252 | _ok_cancel_retry); |
| 253 | if (err != _retry) { |
| 254 | return false; |
| 255 | } |
| 256 | if (FindFilePath(path.c_str(), abs_path, kPathSize, kDataPaths | kModPaths | kAbsPath) != -1) { |
| 257 | retry = false; |
| 258 | } |
| 259 | } |
| 260 | } |
| 261 | LoadText(mem, abs_path); |
| 262 | return true; |
| 263 | } |
| 264 | |
| 265 | void LoadAttribIntoString(TiXmlElement *el, const char *attrib, std::string &str) { |
| 266 | const char *label = el->Attribute(attrib); |
nothing calls this directly
no test coverage detected