13
0

format: Protect the special session_configuration_vars.h and its use of CONFIG_VARIABLE

This commit is contained in:
Mads Kiilerich 2024-07-23 02:30:40 +02:00 committed by Robin Gareus
parent 853204e455
commit 81ca475b10
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 7 additions and 0 deletions

View File

@ -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<Type> var;
@ -67,6 +70,7 @@ public:
#include "ardour/session_configuration_vars.h"
#undef CONFIG_VARIABLE
#undef CONFIG_VARIABLE_SPECIAL
/* clang-format on */
int foo;

View File

@ -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<void (std::string)>& funct
#undef CONFIG_VARIABLE_SPECIAL
}
/* clang-format on */
bool
SessionConfiguration::load_state ()