From 728c8838181f8d137c67897bd83337bb1e6f378a Mon Sep 17 00:00:00 2001 From: Roger Eivind Stenbro Date: Thu, 12 Dec 2024 10:50:46 +0100 Subject: [PATCH] return string from the textual representations, since nullptr "short-circuits" the error message. --- include/cosim/model_description.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/cosim/model_description.hpp b/include/cosim/model_description.hpp index c9dfb1bb..693d49a2 100644 --- a/include/cosim/model_description.hpp +++ b/include/cosim/model_description.hpp @@ -69,7 +69,7 @@ constexpr const char* to_text(variable_type v) case variable_type::boolean: return "boolean"; case variable_type::string: return "string"; case variable_type::enumeration: return "enumeration"; - default: return nullptr; + default: return "NULL"; } } @@ -83,7 +83,7 @@ constexpr const char* to_text(variable_causality v) case variable_causality::input: return "input"; case variable_causality::output: return "output"; case variable_causality::local: return "local"; - default: return nullptr; + default: return "NULL"; } } @@ -97,7 +97,7 @@ constexpr const char* to_text(variable_variability v) case variable_variability::tunable: return "tunable"; case variable_variability::discrete: return "discrete"; case variable_variability::continuous: return "continuous"; - default: return nullptr; + default: return "NULL"; } }