Skip to content

Commit

Permalink
return string from the textual representations, since nullptr "short-…
Browse files Browse the repository at this point in the history
…circuits" the error message.
  • Loading branch information
restenb committed Dec 12, 2024
1 parent 2cf995a commit 728c883
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/cosim/model_description.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
}

Expand All @@ -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";
}
}

Expand All @@ -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";
}
}

Expand Down

0 comments on commit 728c883

Please sign in to comment.