Skip to content

Commit

Permalink
Fix std::as_const errors
Browse files Browse the repository at this point in the history
  • Loading branch information
plfiorini committed Oct 12, 2024
1 parent f905d1b commit fcbfc61
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ include(ECMQmlModule)
## Disable use of C++ API deprecated in Qt 5.15
add_compile_definitions(QT_DISABLE_DEPRECATED_UP_TO=0x050F00)

## Enable -Werror by default:
add_compile_options(-Werror)

## Shared macros and functions:
if(NOT LIRI_LOCAL_ECM)
find_package(LiriCMakeShared "2.0.99" REQUIRED NO_MODULE)
Expand Down
2 changes: 1 addition & 1 deletion src/manager/session.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ void Session::shutdown()

// Stop modules
std::reverse(m_loadedModules.begin(), m_loadedModules.end());
for (auto module : qAsConst(m_loadedModules)) {
for (auto module : std::as_const(m_loadedModules)) {
auto instance = dynamic_cast<QObject *>(module);
const auto name = m_pluginRegistry->getNameForInstance(instance);

Expand Down

0 comments on commit fcbfc61

Please sign in to comment.