| 399 | } |
| 400 | |
| 401 | void ScriptFileUtil::ReturnPaths(const Path& script_path, PathSet& path_set) { |
| 402 | path_set.insert("script " + script_path.GetOriginalPathStr()); |
| 403 | const ScriptFile& script_file = *ScriptFileUtil::GetScriptFile(script_path); |
| 404 | const std::string& script = script_file.contents; |
| 405 | std::string load_path; |
| 406 | std::string type; |
| 407 | std::string::size_type index = 0; |
| 408 | while (1) { |
| 409 | index = script.find("\"Data/", index); // Set index to first quote of "Data/" path |
| 410 | if (index == std::string::npos) { |
| 411 | break; |
| 412 | } |
| 413 | ++index; // Set index to first character of Data/ path |
| 414 | std::string::size_type end_quote = script.find('\"', index); // Find last quote |
| 415 | load_path = script.substr(index, end_quote - index); |
| 416 | ReturnPathUtil::ReturnPathsFromPath(load_path, path_set); |
| 417 | } |
| 418 | } |
| 419 | |
| 420 | void ScriptFileCache::Dispose() { |
| 421 | files.clear(); |
nothing calls this directly
no test coverage detected