From dfb14abf7876d54f0eaf4ca1694a083ef641b729 Mon Sep 17 00:00:00 2001 From: Eran Date: Sun, 15 Oct 2023 11:56:40 +0300 Subject: [PATCH] replace UNKNOWN_VALUE macro with constexpr --- src/core/enum-helpers.h | 4 ++-- src/to-string.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/enum-helpers.h b/src/core/enum-helpers.h index c7626788d6..ca9381b1b0 100644 --- a/src/core/enum-helpers.h +++ b/src/core/enum-helpers.h @@ -7,10 +7,10 @@ #include -#define UNKNOWN_VALUE "UNKNOWN" +namespace librealsense { -namespace librealsense { +constexpr static char const * UNKNOWN_VALUE = "UNKNOWN"; // Require the last enumerator value to be in format of RS2_#####_COUNT diff --git a/src/to-string.cpp b/src/to-string.cpp index 647f9eeab0..7515514621 100644 --- a/src/to-string.cpp +++ b/src/to-string.cpp @@ -17,7 +17,7 @@ #define STRARR( ARRAY, T, X ) ARRAY[RS2_##T##_##X] = STRX( X ) -static std::string const unknown_value_str( UNKNOWN_VALUE ); +static std::string const unknown_value_str( librealsense::UNKNOWN_VALUE ); namespace librealsense {