补齐vs所需文件 开始着手准备重写readme

This commit is contained in:
2026-06-03 17:15:11 +08:00
parent 959055ce90
commit 45220c8279
7 changed files with 472 additions and 159 deletions
+4 -2
View File
@@ -125,7 +125,8 @@ TmxTileset ParseTileset(const pugi::xml_node& node, const std::filesystem::path&
const std::filesystem::path tsxPath = NormalizePath(mapDir, source);
pugi::xml_document doc;
pugi::xml_parse_result ok = doc.load_file(tsxPath.c_str());
const std::string tsxPathText = tsxPath.string();
pugi::xml_parse_result ok = doc.load_file(tsxPathText.c_str());
if (!ok) {
throw std::runtime_error("Could not parse TSX: " + tsxPath.string());
}
@@ -184,7 +185,8 @@ std::uint32_t CleanGid(std::uint32_t gid)
TmxMap LoadTmxMap(const std::filesystem::path& path)
{
pugi::xml_document doc;
pugi::xml_parse_result ok = doc.load_file(path.c_str());
const std::string pathText = path.string();
pugi::xml_parse_result ok = doc.load_file(pathText.c_str());
if (!ok) {
throw std::runtime_error("Could not parse TMX: " + path.string());
}