mirror of
https://github.com/ScrelliCopter/tmx2gba.git
synced 2025-02-21 03:29:25 +11:00
Compare commits
4 Commits
e6053f9472
...
tmx
| Author | SHA1 | Date | |
|---|---|---|---|
| 5937455000 | |||
| 224e1e53e9 | |||
| b8d7d43899 | |||
| 056612667b |
@@ -59,7 +59,6 @@ sudo cmake --install build
|
|||||||
|
|
||||||
## License ##
|
## License ##
|
||||||
[tmx2gba](https://github.com/ScrelliCopter/tmx2gba) is licensed under the [Zlib license](COPYING.txt).
|
[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).
|
- [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).
|
- [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).
|
- [miniz](https://github.com/richgel999/miniz) is licensed under the [MIT license](ext/miniz/LICENSE).
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
|
|
||||||
ArgParse::ArgParser::ArgParser(
|
ArgParse::ArgParser::ArgParser(
|
||||||
@@ -99,19 +100,18 @@ ArgParse::ParseCtrl ArgParse::ParserState::Next(const std::string_view token)
|
|||||||
{
|
{
|
||||||
flagChar = flag.value();
|
flagChar = flag.value();
|
||||||
const auto opt = getOption(flagChar);
|
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();
|
expectArg = expect;
|
||||||
if (token.length() <= 2)
|
if (!expectArg)
|
||||||
{
|
return handler(flagChar, "");
|
||||||
expectArg = expect;
|
}
|
||||||
if (!expectArg)
|
else
|
||||||
return handler(flagChar, "");
|
{
|
||||||
}
|
return handler(flagChar, expect ? token.substr(2) : "");
|
||||||
else
|
|
||||||
{
|
|
||||||
return handler(flagChar, expect ? token.substr(2) : "");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (!token.empty())
|
else if (!token.empty())
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <string_view>
|
#include <string_view>
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
// Cut leading & trailing whitespace (including newlines)
|
// Cut leading & trailing whitespace (including newlines)
|
||||||
[[nodiscard]] const std::string_view TrimWhitespace(const std::string_view str);
|
[[nodiscard]] const std::string_view TrimWhitespace(const std::string_view str);
|
||||||
|
|||||||
@@ -102,7 +102,8 @@ TmxReader::Error TmxReader::Open(const std::string& inPath,
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mObjects.emplace(objs);
|
if (!objs.empty())
|
||||||
|
mObjects.emplace(objs);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Error::OK;
|
return Error::OK;
|
||||||
|
|||||||
Reference in New Issue
Block a user