Best I can do to simplify the check(fmt::format)crap is to make a little macro to do the format part.

This commit is contained in:
Zed A. Shaw 2026-03-05 12:39:22 -05:00
parent 6710469ee1
commit f0b04107ab
28 changed files with 108 additions and 108 deletions

View file

@ -106,10 +106,10 @@ bool Map::INVARIANT() {
for(auto room : $rooms) {
check(int(room.x) >= 0 && int(room.y) >= 0,
format("room invalid position {},{}",
$F("room invalid position {},{}",
room.x, room.y));
check(int(room.width) > 0 && int(room.height) > 0,
format("room has invalid dims {},{}",
$F("room has invalid dims {},{}",
room.width, room.height));
}