From 764daf8ef80b6be52a2d8a3b3c45b794403e0be4 Mon Sep 17 00:00:00 2001 From: "Clarence \"Sparr\" Risher" Date: Fri, 15 Nov 2024 15:36:19 -0500 Subject: [PATCH] Minimal storage class for point constants --- src/coordinates.h | 28 ++++++++++++++-------------- tests/monster_test.cpp | 8 ++++---- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/coordinates.h b/src/coordinates.h index 3306ff7856b5e..cce769456ea93 100644 --- a/src/coordinates.h +++ b/src/coordinates.h @@ -289,68 +289,68 @@ class coord_point_ob : public // These definitions can go in the class in clang and gcc, and are much shorter there, // but MSVC doesn't allow that, so... template -inline constexpr coord_point_ob +const coord_point_ob coord_point_ob::min = coord_point_ob( Point::min ); template -inline constexpr coord_point_ob +const coord_point_ob coord_point_ob::max = coord_point_ob( Point::max ); template -inline constexpr coord_point_ob +const coord_point_ob coord_point_ob::invalid = coord_point_ob( Point::invalid ); template -inline constexpr coord_point_ob +const coord_point_ob coord_point_ob::zero = coord_point_ob( Point::zero ); template -inline constexpr coord_point_ob +const coord_point_ob coord_point_ob_rel::north = coord_point_ob( Point::north ); template -constexpr const coord_point_ob +const coord_point_ob coord_point_ob_rel::north_east = coord_point_ob( Point::north_east ); template -inline constexpr coord_point_ob +const coord_point_ob coord_point_ob_rel::east = coord_point_ob( Point::east ); template -constexpr const coord_point_ob +const coord_point_ob coord_point_ob_rel::south_east = coord_point_ob( Point::south_east ); template -inline constexpr coord_point_ob +const coord_point_ob coord_point_ob_rel::south = coord_point_ob( Point::south ); template -constexpr const coord_point_ob +const coord_point_ob coord_point_ob_rel::south_west = coord_point_ob( Point::south_west ); template -inline constexpr coord_point_ob +const coord_point_ob coord_point_ob_rel::west = coord_point_ob( Point::west ); template -constexpr const coord_point_ob +const coord_point_ob coord_point_ob_rel::north_west = coord_point_ob( Point::north_west ); template -inline constexpr coord_point_ob +const coord_point_ob coord_point_ob_3d::above = coord_point_ob( Point::above ); template -inline constexpr coord_point_ob +const coord_point_ob coord_point_ob_3d::below = coord_point_ob( Point::below ); diff --git a/tests/monster_test.cpp b/tests/monster_test.cpp index d263b2f888d8e..2762d03d7f770 100644 --- a/tests/monster_test.cpp +++ b/tests/monster_test.cpp @@ -421,7 +421,7 @@ TEST_CASE( "monsters_spawn_eggs", "[monster][reproduction]" ) { clear_map(); map &here = get_map(); - tripoint_bub_ms loc = get_avatar().pos_bub() + tripoint_east; + tripoint_bub_ms loc = get_avatar().pos_bub() + tripoint::east; monster &test_monster = spawn_test_monster( "mon_dummy_reproducer_eggs", loc ); bool test_monster_spawns_eggs = false; int amount_of_iteration = 0; @@ -443,7 +443,7 @@ TEST_CASE( "monsters_spawn_egg_itemgroups", "[monster][reproduction]" ) { clear_map(); map &here = get_map(); - tripoint_bub_ms loc = get_avatar().pos_bub() + tripoint_east; + tripoint_bub_ms loc = get_avatar().pos_bub() + tripoint::east; monster &test_monster = spawn_test_monster( "mon_dummy_reproducer_egg_group", loc ); bool test_monster_spawns_egg_group = false; int amount_of_iteration = 0; @@ -465,7 +465,7 @@ TEST_CASE( "monsters_spawn_babies", "[monster][reproduction]" ) { clear_map(); creature_tracker &creatures = get_creature_tracker(); - tripoint_bub_ms loc = get_avatar().pos_bub() + tripoint_east; + tripoint_bub_ms loc = get_avatar().pos_bub() + tripoint::east; monster &test_monster = spawn_test_monster( "mon_dummy_reproducer_mon", loc ); bool test_monster_spawns_babies = false; int amount_of_iteration = 0; @@ -488,7 +488,7 @@ TEST_CASE( "monsters_spawn_baby_groups", "[monster][reproduction]" ) { clear_map(); creature_tracker &creatures = get_creature_tracker(); - tripoint_bub_ms loc = get_avatar().pos_bub() + tripoint_east; + tripoint_bub_ms loc = get_avatar().pos_bub() + tripoint::east; monster &test_monster = spawn_test_monster( "mon_dummy_reproducer_mon_group", loc ); bool test_monster_spawns_baby_mongroup = false; int amount_of_iteration = 0;