From ce72337d3a65c2e3bec5044c79c4a7833e83baf0 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Tue, 29 Apr 2025 10:52:27 +0200 Subject: [PATCH] Mark settings as internal #6623 --- src/ifcgeom/ConversionSettings.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/ifcgeom/ConversionSettings.h b/src/ifcgeom/ConversionSettings.h index a82be36b05..c5361b30c0 100644 --- a/src/ifcgeom/ConversionSettings.h +++ b/src/ifcgeom/ConversionSettings.h @@ -40,7 +40,7 @@ namespace ifcopenshell { struct HasDefault : std::true_type { }; #endif - template + template struct SettingBase { typedef T base_type; @@ -61,7 +61,9 @@ namespace ifcopenshell { return x; } }; - if constexpr (std::is_same_v) { + if constexpr (Internal) { + // do nothing, this is an internal setting and not supposed to be set from the command line + } else if constexpr (std::is_same_v) { // @todo bool_switch doesn't work with optional unfortunately... value.emplace(); desc.add_options()(Derived::name, apply_default(po::bool_switch(&*value)), Derived::description); @@ -120,19 +122,19 @@ namespace ifcopenshell { static constexpr bool defaultvalue = false; }; - struct LengthUnit : public SettingBase { + struct LengthUnit : public SettingBase { static constexpr const char* const name = "length-unit"; static constexpr const char* const description = ""; static constexpr double defaultvalue = 1.0; }; - struct PlaneUnit : public SettingBase { + struct PlaneUnit : public SettingBase { static constexpr const char* const name = "angle-unit"; static constexpr const char* const description = ""; static constexpr double defaultvalue = 1.0; }; - struct Precision : public SettingBase { + struct Precision : public SettingBase { static constexpr const char* const name = "precision"; static constexpr const char* const description = ""; static constexpr double defaultvalue = 0.00001;