diff options
Diffstat (limited to 'src/misc')
-rw-r--r-- | src/misc/dbg_helpers.cpp | 6 | ||||
-rw-r--r-- | src/misc/dbg_helpers.h | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/misc/dbg_helpers.cpp b/src/misc/dbg_helpers.cpp index 4af243888..6a98680dc 100644 --- a/src/misc/dbg_helpers.cpp +++ b/src/misc/dbg_helpers.cpp @@ -14,7 +14,7 @@ #include "dbg_helpers.h" /** Trackdir & TrackdirBits short names. */ -static const char *trackdir_names[] = { +static const char * const trackdir_names[] = { "NE", "SE", "UE", "LE", "LS", "RS", "rne", "rse", "SW", "NW", "UW", "LW", "LN", "RN", "rsw", "rnw", }; @@ -37,7 +37,7 @@ CStrA ValueStr(TrackdirBits td_bits) /** DiagDirection short names. */ -static const char *diagdir_names[] = { +static const char * const diagdir_names[] = { "NE", "SE", "SW", "NW", }; @@ -51,7 +51,7 @@ CStrA ValueStr(DiagDirection dd) /** SignalType short names. */ -static const char *signal_type_names[] = { +static const char * const signal_type_names[] = { "NORMAL", "ENTRY", "EXIT", "COMBO", "PBS", "NOENTRY", }; diff --git a/src/misc/dbg_helpers.h b/src/misc/dbg_helpers.h index 73175f201..56eebb247 100644 --- a/src/misc/dbg_helpers.h +++ b/src/misc/dbg_helpers.h @@ -34,7 +34,7 @@ template <typename T, size_t N> struct ArrayT<T[N]> { * or t_unk when index is out of bounds. */ template <typename E, typename T> -inline typename ArrayT<T>::item_t ItemAtT(E idx, T &t, typename ArrayT<T>::item_t t_unk) +inline typename ArrayT<T>::item_t ItemAtT(E idx, const T &t, typename ArrayT<T>::item_t t_unk) { if ((size_t)idx >= ArrayT<T>::length) { return t_unk; @@ -48,7 +48,7 @@ inline typename ArrayT<T>::item_t ItemAtT(E idx, T &t, typename ArrayT<T>::item_ * or t_unk when index is out of bounds. */ template <typename E, typename T> -inline typename ArrayT<T>::item_t ItemAtT(E idx, T &t, typename ArrayT<T>::item_t t_unk, E idx_inv, typename ArrayT<T>::item_t t_inv) +inline typename ArrayT<T>::item_t ItemAtT(E idx, const T &t, typename ArrayT<T>::item_t t_unk, E idx_inv, typename ArrayT<T>::item_t t_inv) { if ((size_t)idx < ArrayT<T>::length) { return t[idx]; |