From 81ca475b102bc2c0159fb28c5c69a8dfb9c51272 Mon Sep 17 00:00:00 2001 From: Mads Kiilerich Date: Tue, 23 Jul 2024 02:30:40 +0200 Subject: [PATCH] format: Protect the special session_configuration_vars.h and its use of CONFIG_VARIABLE --- libs/ardour/ardour/session_configuration.h | 4 ++++ libs/ardour/session_configuration.cc | 3 +++ 2 files changed, 7 insertions(+) diff --git a/libs/ardour/ardour/session_configuration.h b/libs/ardour/ardour/session_configuration.h index d9b55c9742..8bcd053c1b 100644 --- a/libs/ardour/ardour/session_configuration.h +++ b/libs/ardour/ardour/session_configuration.h @@ -44,6 +44,7 @@ public: /* define accessor methods */ + /* clang-format off */ #undef CONFIG_VARIABLE #undef CONFIG_VARIABLE_SPECIAL #define CONFIG_VARIABLE(Type,var,name,value) \ @@ -55,11 +56,13 @@ public: #include "ardour/session_configuration_vars.h" #undef CONFIG_VARIABLE #undef CONFIG_VARIABLE_SPECIAL + /* clang-format on */ private: /* declare variables */ + /* clang-format off */ #undef CONFIG_VARIABLE #undef CONFIG_VARIABLE_SPECIAL #define CONFIG_VARIABLE(Type,var,name,value) PBD::ConfigVariable var; @@ -67,6 +70,7 @@ public: #include "ardour/session_configuration_vars.h" #undef CONFIG_VARIABLE #undef CONFIG_VARIABLE_SPECIAL + /* clang-format on */ int foo; diff --git a/libs/ardour/session_configuration.cc b/libs/ardour/session_configuration.cc index cb5c323804..b6984c2a1d 100644 --- a/libs/ardour/session_configuration.cc +++ b/libs/ardour/session_configuration.cc @@ -41,6 +41,8 @@ using namespace ARDOUR; using namespace PBD; +/* clang-format off */ + SessionConfiguration::SessionConfiguration () : /* construct variables */ @@ -151,6 +153,7 @@ SessionConfiguration::map_parameters (boost::function& funct #undef CONFIG_VARIABLE_SPECIAL } +/* clang-format on */ bool SessionConfiguration::load_state ()