Skip to content

Commit

Permalink
format_as should be inline, not static
Browse files Browse the repository at this point in the history
  • Loading branch information
ibell committed Aug 29, 2023
1 parent 43f1e96 commit 3cab04a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions include/CoolPropFluid.h
Original file line number Diff line number Diff line change
Expand Up @@ -566,15 +566,15 @@ class CoolPropFluid
};

#if !defined(NO_FMTLIB) && FMT_VERSION >= 90000
static int format_as(ViscosityDiluteVariables::ViscosityDiluteType type) {
inline int format_as(ViscosityDiluteVariables::ViscosityDiluteType type) {
return fmt::underlying(type);
}

static int format_as(TransportPropertyData::ViscosityHardcodedEnum viscosity) {
inline int format_as(TransportPropertyData::ViscosityHardcodedEnum viscosity) {
return fmt::underlying(viscosity);
}

static int format_as(TransportPropertyData::ConductivityHardcodedEnum conductivity) {
inline int format_as(TransportPropertyData::ConductivityHardcodedEnum conductivity) {
return fmt::underlying(conductivity);
}
#endif
Expand Down
16 changes: 8 additions & 8 deletions include/DataStructures.h
Original file line number Diff line number Diff line change
Expand Up @@ -475,35 +475,35 @@ std::string get_backend_string(backends backend);

#if !defined(NO_FMTLIB) && FMT_VERSION >= 90000
/// Allows enums to be formatted
static int format_as(parameters parameter) {
inline int format_as(parameters parameter) {
return fmt::underlying(parameter);
}

static int format_as(phases phase) {
inline int format_as(phases phase) {
return fmt::underlying(phase);
}

static int format_as(schemes scheme) {
inline int format_as(schemes scheme) {
return fmt::underlying(scheme);
}

static int format_as(composition_types type) {
inline int format_as(composition_types type) {
return fmt::underlying(type);
}

static int format_as(fluid_types type) {
inline int format_as(fluid_types type) {
return fmt::underlying(type);
}

static int format_as(input_pairs pair) {
inline int format_as(input_pairs pair) {
return fmt::underlying(pair);
}

static int format_as(backend_families family) {
inline int format_as(backend_families family) {
return fmt::underlying(family);
}

static int format_as(backends backend) {
inline int format_as(backends backend) {
return fmt::underlying(backend);
}
#endif
Expand Down
2 changes: 1 addition & 1 deletion include/IncompressibleFluid.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ struct IncompressibleData
};

#if !defined(NO_FMTLIB) && FMT_VERSION >= 90000
static int format_as(IncompressibleData::IncompressibleTypeEnum type) {
inline int format_as(IncompressibleData::IncompressibleTypeEnum type) {
return fmt::underlying(type);
}
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/Backends/Helmholtz/VLERoutines.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ struct saturation_PHSU_pure_options
};

#if !defined(NO_FMTLIB) && FMT_VERSION >= 90000
static int format_as(saturation_PHSU_pure_options::specified_variable_options option) {
inline int format_as(saturation_PHSU_pure_options::specified_variable_options option) {
return fmt::underlying(option);
}
#endif
Expand Down

0 comments on commit 3cab04a

Please sign in to comment.