From f75c41317c7597fe833ab68d1a1381a28e679eb1 Mon Sep 17 00:00:00 2001 From: Emily Boudreaux Date: Tue, 7 Apr 2026 10:05:05 -0400 Subject: [PATCH] fix(ansi.h): fixed multi symbol export supports_ansi_colors has been marked inline to allow its use in multiple translation units --- meson.build | 2 +- src/config/include/fourdst/config/ansi.h | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/meson.build b/meson.build index f518967..4549618 100644 --- a/meson.build +++ b/meson.build @@ -18,7 +18,7 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # *********************************************************************** # -project('libconfig', ['cpp', 'c'], version: 'v2.2.0', default_options: ['cpp_std=c++23'], meson_version: '>=1.5.0') +project('libconfig', ['cpp', 'c'], version: 'v2.2.1', default_options: ['cpp_std=c++23'], meson_version: '>=1.5.0') # Add default visibility for all C++ targets add_project_arguments('-fvisibility=default', language: 'cpp') diff --git a/src/config/include/fourdst/config/ansi.h b/src/config/include/fourdst/config/ansi.h index b624251..72b9bca 100644 --- a/src/config/include/fourdst/config/ansi.h +++ b/src/config/include/fourdst/config/ansi.h @@ -16,7 +16,7 @@ namespace fourdst::config::utils { - bool supports_ansi_colors() { + inline bool supports_ansi_colors() { if (std::getenv("NO_COLOR")) return false; if (std::getenv("FORCE_COLOR")) return true; @@ -36,7 +36,7 @@ namespace fourdst::config::utils { #endif } - const static bool TERM_COLOR_SUPPORT = supports_ansi_colors(); + inline const bool TERM_COLOR_SUPPORT = supports_ansi_colors(); class ANSIColor { public: @@ -54,9 +54,9 @@ namespace fourdst::config::utils { }; - static ANSIColor RED{"\033[31m"}; - static ANSIColor GREEN{"\033[32m"}; - static ANSIColor BLUE{"\033[34m"}; - static ANSIColor CYAN{"\033[36m"}; - static ANSIColor RESET{"\033[0m"}; + inline ANSIColor RED{"\033[31m"}; + inline ANSIColor GREEN{"\033[32m"}; + inline ANSIColor BLUE{"\033[34m"}; + inline ANSIColor CYAN{"\033[36m"}; + inline ANSIColor RESET{"\033[0m"}; } \ No newline at end of file