diff --git a/src/types.hpp b/src/types.hpp index f6c8fa1..0d5210b 100644 --- a/src/types.hpp +++ b/src/types.hpp @@ -66,10 +66,10 @@ struct Entity { basic_cords Central_position(std::optional x = std::nullopt, std::optional y = std::nullopt) { - if (x != NULL) { + if (x != std::nullopt) { position.x = *x - position.w / 2; } - if (y != NULL) { + if (y != std::nullopt) { position.y = *y - position.h / 2; }