Skip to content

Commit

Permalink
feat: switch to C++20
Browse files Browse the repository at this point in the history
We may use C++20 features from now on. For clang-tidy compliance a check is
changed to using the new map "contains" feature.
  • Loading branch information
romangg committed Mar 20, 2023
1 parent b6d236a commit ea40d25
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ set(CMAKE_LINK_DEPENDS_NO_SHARED ON)
option(BUILD_SHARED_LIBS "If enabled, shared libs will be built by default, otherwise static libs" ON)
set(CMAKE_AUTOMOC ON)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
set(CMAKE_CXX_EXTENSIONS OFF)

Expand Down
2 changes: 1 addition & 1 deletion server/xdg_decoration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ void XdgDecorationManager::Private::getToplevelDecorationCallback(XdgDecorationM
bind->post_error(ZXDG_TOPLEVEL_DECORATION_V1_ERROR_ORPHANED, "No xdg-toplevel found.");
return;
}
if (priv->m_decorations.count(toplevel) > 0) {
if (priv->m_decorations.contains(toplevel)) {
bind->post_error(ZXDG_TOPLEVEL_DECORATION_V1_ERROR_ALREADY_CONSTRUCTED,
"xdg decoration already created for this xdg-toplevel.");
return;
Expand Down

0 comments on commit ea40d25

Please sign in to comment.