Skip to content

Commit

Permalink
Small changed to ensure key mapping configuration and no assert on ar…
Browse files Browse the repository at this point in the history
…ch linux builds
  • Loading branch information
Yaraslaut committed Feb 2, 2025
1 parent fdf03a3 commit a213999
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/actions/spelling/allow/uncategorized.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ DATAROOTDIR
DBus
DCCACHE
DCMAKE
DNDEBUG
DCODE
DCONTOUR
DEFGHIJKL
Expand Down
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ if(DEFINED MSVC)
add_compile_options(/nologo)
endif()


# CMAKE_BUILD_TYPE check for None
if(CMAKE_BUILD_TYPE STREQUAL "None")
add_compile_definitions(-DNDEBUG)
endif()

if (CONTOUR_BUILD_WITH_MIMALLOC)
add_definitions(-DCONTOUR_BUILD_WITH_MIMALLOC)
endif()
Expand Down
10 changes: 9 additions & 1 deletion src/contour/Actions.h
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,11 @@ namespace documentation
constexpr inline std::string_view SwitchToTabRight { "Switch to tab to the right" };
} // namespace documentation

inline auto getDocumentation()
#if defined(__clang__) && __clang_major__ >= 19
constexpr
#endif
inline auto
getDocumentation()
{
return std::array {
std::tuple { Action { CancelSelection {} }, documentation::CancelSelection },
Expand Down Expand Up @@ -348,6 +352,10 @@ inline auto getDocumentation()
};
}

#if defined(__clang__) && __clang_major__ >= 19
static_assert(getDocumentation().size() == std::variant_size_v<Action>);
#endif

} // namespace contour::actions

// {{{ fmtlib custom formatters
Expand Down

0 comments on commit a213999

Please sign in to comment.