Skip to content

Commit f08065c

Browse files
committed
fixed cast to bool
1 parent 73f7cf3 commit f08065c

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

project_config/config.hpp.in

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ namespace sys {
118118

119119
inline constexpr auto os = Os::${SYSTEM_NAME_SANITISED};
120120
inline constexpr std::string_view os_str = "${SYSTEM_NAME_SANITISED}";
121-
inline constexpr auto is_unix = static_cast<bool>(${PROJECT_NAME_CAPS}_SYSTEM_IS_UNIX);
121+
inline constexpr auto is_unix = ${PROJECT_NAME_CAPS}_SYSTEM_IS_UNIX != 0;
122122
inline constexpr std::string_view version = ${PROJECT_NAME_CAPS}_SYSTEM_VERSION;
123123
} // namespace sys
124124

@@ -133,9 +133,9 @@ namespace compiler {
133133

134134
inline constexpr auto vendor = Vendor::${CMAKE_CXX_COMPILER_ID};
135135
inline constexpr std::string_view vendor_str = "${CMAKE_CXX_COMPILER_ID}";
136-
inline constexpr auto is_clang_like = static_cast<bool>(${PROJECT_NAME_CAPS}_COMPILER_IS_CLANG_LIKE);
137-
inline constexpr auto is_gnu_like = static_cast<bool>(${PROJECT_NAME_CAPS}_COMPILER_IS_GNU_LIKE);
138-
inline constexpr auto is_icc_like = static_cast<bool>(${PROJECT_NAME_CAPS}_COMPILER_IS_ICC_LIKE);
136+
inline constexpr auto is_clang_like = ${PROJECT_NAME_CAPS}_COMPILER_IS_CLANG_LIKE != 0;
137+
inline constexpr auto is_gnu_like = ${PROJECT_NAME_CAPS}_COMPILER_IS_GNU_LIKE != 0;
138+
inline constexpr auto is_icc_like = ${PROJECT_NAME_CAPS}_COMPILER_IS_ICC_LIKE != 0;
139139

140140
namespace version {
141141
inline constexpr std::string_view full = ${PROJECT_NAME_CAPS}_COMPILER_VERSION;

0 commit comments

Comments
 (0)