Skip to content

Commit

Permalink
use using enum
Browse files Browse the repository at this point in the history
Signed-off-by: Laurynas Jagutis <[email protected]>
  • Loading branch information
Laurynas-Jagutis committed Oct 30, 2024
1 parent 226aac9 commit d7c94b1
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,14 @@ PGM_IO_VnfConverter* PGM_IO_create_vnf_converter(PGM_IO_Handle* handle, char con
return call_with_catch(
handle,
[file_buffer, experimental_features] {
auto experimental_feature = ExperimentalFeatures::experimental_features_disabled;
using enum ExperimentalFeatures;
auto experimental_feature = experimental_features_disabled;
switch (experimental_features) {
case PGM_IO_experimental_features_disabled:
experimental_feature = ExperimentalFeatures::experimental_features_disabled;
experimental_feature = experimental_features_disabled;
break;
case PGM_IO_experimental_features_enabled:
experimental_feature = ExperimentalFeatures::experimental_features_enabled;
experimental_feature = experimental_features_enabled;
break;
default:
throw power_grid_model::MissingCaseForEnumError{"PGM_IO_create_vnf_converter", experimental_features};
Expand Down

0 comments on commit d7c94b1

Please sign in to comment.