1
0
mirror of https://github.com/ScrelliCopter/tmx2gba.git synced 2025-02-21 03:29:25 +11:00

Compare commits

3 Commits

Author SHA1 Message Date
224e1e53e9 fix empty objects list triggering an assertion failure 2024-04-11 16:31:17 +10:00
b8d7d43899 argparse: fix unknown flags not being reported 2024-04-11 16:21:33 +10:00
056612667b update readme 2024-04-11 15:34:53 +10:00
3 changed files with 13 additions and 14 deletions

View File

@@ -59,7 +59,6 @@ sudo cmake --install build
## License ##
[tmx2gba](https://github.com/ScrelliCopter/tmx2gba) is licensed under the [Zlib license](COPYING.txt).
- A modified [tmxlite](https://github.com/fallahn/tmxlite) is licensed under the [Zlib license](ext/tmxlite/LICENSE).
- [pugixml](https://pugixml.org/) is licensed under the [MIT license](ext/pugixml/LICENSE.md).
- [René Nyffenegger's base64.cpp](https://github.com/ReneNyffenegger/cpp-base64) is licensed under the [Zlib license](ext/base64/LICENSE).
- [miniz](https://github.com/richgel999/miniz) is licensed under the [MIT license](ext/miniz/LICENSE).

View File

@@ -99,19 +99,18 @@ ArgParse::ParseCtrl ArgParse::ParserState::Next(const std::string_view token)
{
flagChar = flag.value();
const auto opt = getOption(flagChar);
if (opt.has_value())
if (!opt.has_value())
return ParseCtrl::QUIT_ERR_UNKNOWN;
bool expect = !opt.value().get().argumentName.empty();
if (token.length() <= 2)
{
bool expect = !opt.value().get().argumentName.empty();
if (token.length() <= 2)
{
expectArg = expect;
if (!expectArg)
return handler(flagChar, "");
}
else
{
return handler(flagChar, expect ? token.substr(2) : "");
}
expectArg = expect;
if (!expectArg)
return handler(flagChar, "");
}
else
{
return handler(flagChar, expect ? token.substr(2) : "");
}
}
else if (!token.empty())

View File

@@ -102,7 +102,8 @@ TmxReader::Error TmxReader::Open(const std::string& inPath,
});
}
}
mObjects.emplace(objs);
if (!objs.empty())
mObjects.emplace(objs);
}
return Error::OK;