update compiler flags, fix tracy allocation profiling, fix compiler warnings

This commit is contained in:
2026-02-23 22:25:34 +01:00
parent 59a4303d62
commit 404a76654c
19 changed files with 236 additions and 162 deletions

View File

@ -1,4 +1,5 @@
#include "puzzle.hpp"
#include "tracy.hpp"
auto Block::Hash() const -> int {
std::string s = std::format("{},{},{},{}", x, y, width, height);
@ -144,12 +145,11 @@ auto State::ToggleTarget(int x, int y) -> bool {
// Remove the current target
int index;
for (const auto &block : *this) {
if (block.target) {
index = GetIndex(block.x, block.y);
state.replace(
index, 2,
Block(block.x, block.y, block.width, block.height, false).ToString());
for (const auto &b : *this) {
if (b.target) {
index = GetIndex(b.x, b.y);
state.replace(index, 2,
Block(b.x, b.y, b.width, b.height, false).ToString());
break;
}
}