Turned on all the warnings I could handle and made them into errors then fixed them all. Worldbuilder needs a refactor in random_path.

This commit is contained in:
Zed A. Shaw 2025-01-10 15:22:37 -05:00
parent f3f875ee80
commit 128fc4f540
19 changed files with 85 additions and 85 deletions

View file

@ -66,8 +66,7 @@ TEST_CASE("test out ragel parser", "[gui]") {
std::wstring colors_utf = $converter.from_bytes(colors);
bool good = ansi.parse(colors_utf,
[&](sf::Color color, sf::Color bgcolor){
// ignore color
[&](sf::Color color[[maybe_unused]], sf::Color bgcolor[[maybe_unused]]){
},
[&](wchar_t ch) {
bool correct_char = ch == '#' || ch == ' ' || ch == '\n' || ch == '\r';

View file

@ -119,8 +119,14 @@ TEST_CASE("confirm ECS system works", "[ecs]") {
println("--- After remove test, should only result in test2:");
world.query<Position, Velocity>([&](const auto &ent, auto &pos, auto &vel) {
auto &in_position = world.get<Position>(ent);
auto &in_velocity = world.get<Velocity>(ent);
REQUIRE(pos.x >= 0);
REQUIRE(pos.y >= 0);
REQUIRE(in_position.x == pos.x);
REQUIRE(in_position.y == pos.y);
REQUIRE(in_velocity.x == vel.x);
REQUIRE(in_velocity.y == vel.y);
});
}

View file

@ -25,7 +25,7 @@ public:
}
void START(MyEvent ev) {
println("<<< START");
println("<<< START {}", (int)ev);
state(MyState::RUNNING);
}
@ -40,7 +40,7 @@ public:
}
void END(MyEvent ev) {
println("<<< STOP");
println("<<< STOP {}", (int)ev);
state(MyState::END);
}
};

View file

@ -17,10 +17,10 @@ void test_ansi_parsing(Panel &panel) {
ANSIParser ansi(default_fg, default_bg);
bool good = ansi.parse(panel.to_string(),
[&](sf::Color color, sf::Color bgcolor){
[&](sf::Color color[[maybe_unused]], sf::Color bgcolor[[maybe_unused]]){
// ignore color
},
[&](wchar_t ch) {
[&](wchar_t ch[[maybe_unused]]) {
// ignore char
});