Improve ASSERT macro, fix linux file paths in Taskfile and hopefully fix the windows release (#1295)

* ci: fix windows releases (hopefully)

* scripts: fix Taskfile file references for linux

* asserts: add `ASSERT_MSG` macro and ensure `stdout` is flushed before `abort`ing

* asserts: refactor all `assert(false);` with a preceeding message instances

* lint: format

* temp...

* fix compiler errors

* assert: allow for string literals in `ASSERT_MSG`

* lint: formatting

* revert temp change for testing
This commit is contained in:
Tyler Wilding
2022-04-12 18:48:27 -04:00
committed by GitHub
parent b263e33e94
commit c4a92571b2
51 changed files with 187 additions and 226 deletions
+5 -6
View File
@@ -236,9 +236,8 @@ void Texture::serialize(Serializer& ser) {
void Level::serialize(Serializer& ser) {
ser.from_ptr(&version);
if (ser.is_loading() && version != TFRAG3_VERSION) {
fmt::print("version mismatch when loading tfrag3 data. Got {}, expected {}\n", version,
TFRAG3_VERSION);
ASSERT(false);
ASSERT_MSG(false, fmt::format("version mismatch when loading tfrag3 data. Got {}, expected {}",
version, TFRAG3_VERSION));
}
ser.from_str(&level_name);
@@ -285,9 +284,9 @@ void Level::serialize(Serializer& ser) {
ser.from_ptr(&version2);
if (ser.is_loading() && version2 != TFRAG3_VERSION) {
fmt::print("version mismatch when loading tfrag3 data (at end). Got {}, expected {}\n",
version2, TFRAG3_VERSION);
ASSERT(false);
ASSERT_MSG(false, fmt::format(
"version mismatch when loading tfrag3 data (at end). Got {}, expected {}",
version2, TFRAG3_VERSION));
}
}