diff options
Diffstat (limited to 'src/yapf')
-rw-r--r-- | src/yapf/yapf_common.hpp | 4 | ||||
-rw-r--r-- | src/yapf/yapf_destrail.hpp | 4 | ||||
-rw-r--r-- | src/yapf/yapf_node_rail.hpp | 2 | ||||
-rw-r--r-- | src/yapf/yapf_road.cpp | 4 |
4 files changed, 7 insertions, 7 deletions
diff --git a/src/yapf/yapf_common.hpp b/src/yapf/yapf_common.hpp index 73d461ed9..51c2fc12a 100644 --- a/src/yapf/yapf_common.hpp +++ b/src/yapf/yapf_common.hpp @@ -150,8 +150,8 @@ public: * adds it to the actual cost from origin and stores the sum to the Node::m_estimate */ inline bool PfCalcEstimate(Node& n) { - static int dg_dir_to_x_offs[] = {-1, 0, 1, 0}; - static int dg_dir_to_y_offs[] = {0, 1, 0, -1}; + static const int dg_dir_to_x_offs[] = {-1, 0, 1, 0}; + static const int dg_dir_to_y_offs[] = {0, 1, 0, -1}; if (PfDetectDestination(n)) { n.m_estimate = n.m_cost; return true; diff --git a/src/yapf/yapf_destrail.hpp b/src/yapf/yapf_destrail.hpp index 405c8e6c0..acdc68244 100644 --- a/src/yapf/yapf_destrail.hpp +++ b/src/yapf/yapf_destrail.hpp @@ -176,8 +176,8 @@ public: * adds it to the actual cost from origin and stores the sum to the Node::m_estimate */ FORCEINLINE bool PfCalcEstimate(Node& n) { - static int dg_dir_to_x_offs[] = {-1, 0, 1, 0}; - static int dg_dir_to_y_offs[] = {0, 1, 0, -1}; + static const int dg_dir_to_x_offs[] = {-1, 0, 1, 0}; + static const int dg_dir_to_y_offs[] = {0, 1, 0, -1}; if (PfDetectDestination(n)) { n.m_estimate = n.m_cost; return true; diff --git a/src/yapf/yapf_node_rail.hpp b/src/yapf/yapf_node_rail.hpp index fb8d1cf86..597424e0a 100644 --- a/src/yapf/yapf_node_rail.hpp +++ b/src/yapf/yapf_node_rail.hpp @@ -119,7 +119,7 @@ DECLARE_ENUM_AS_BIT_SET(EndSegmentReasonBits); inline CStrA ValueStr(EndSegmentReasonBits bits) { - static const char *end_segment_reason_names[] = { + static const char * const end_segment_reason_names[] = { "DEAD_END", "RAIL_TYPE", "INFINITE_LOOP", "SEGMENT_TOO_LONG", "CHOICE_FOLLOWS", "DEPOT", "WAYPOINT", "STATION", "SAFE_TILE", "PATH_TOO_LONG", "FIRST_TWO_WAY_RED", "LOOK_AHEAD_END", "TARGET_REACHED" diff --git a/src/yapf/yapf_road.cpp b/src/yapf/yapf_road.cpp index 076a067d2..63cce55d2 100644 --- a/src/yapf/yapf_road.cpp +++ b/src/yapf/yapf_road.cpp @@ -304,8 +304,8 @@ public: * adds it to the actual cost from origin and stores the sum to the Node::m_estimate */ inline bool PfCalcEstimate(Node& n) { - static int dg_dir_to_x_offs[] = {-1, 0, 1, 0}; - static int dg_dir_to_y_offs[] = {0, 1, 0, -1}; + static const int dg_dir_to_x_offs[] = {-1, 0, 1, 0}; + static const int dg_dir_to_y_offs[] = {0, 1, 0, -1}; if (PfDetectDestination(n)) { n.m_estimate = n.m_cost; return true; |