diff --git a/src/main/Main.cpp b/src/main/Main.cpp index 8cec627d..5813ec7b 100644 --- a/src/main/Main.cpp +++ b/src/main/Main.cpp @@ -38,7 +38,7 @@ int main(int argc, char const* argv[]) try { util::setTerminationHandler(); - util::ScopeGuard loggerShutdownGuard{[]() { util::LogService::shutdown(); }}; + util::ScopeGuard const loggerShutdownGuard{[]() { util::LogService::shutdown(); }}; auto const action = app::CliArgs::parse(argc, argv); return action.apply( diff --git a/src/util/log/Logger.cpp b/src/util/log/Logger.cpp index cb6e5fa3..1f454544 100644 --- a/src/util/log/Logger.cpp +++ b/src/util/log/Logger.cpp @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include @@ -344,7 +343,7 @@ Logger::Pump::Pump(std::shared_ptr logger, Severity sev, SourceL Logger::Pump::~Pump() { if (enabled_) { - spdlog::source_loc sourceLocation{prettyPath(sourceLocation_).cbegin(), sourceLocation_.line(), nullptr}; + spdlog::source_loc const sourceLocation{prettyPath(sourceLocation_).cbegin(), sourceLocation_.line(), nullptr}; logger_->log(sourceLocation, toSpdlogLevel(severity_), std::move(stream_).str()); } } @@ -387,7 +386,7 @@ Logger::Logger(std::shared_ptr logger) : logger_(std::move(logge std::string_view Logger::Pump::prettyPath(SourceLocationType const& loc, size_t maxDepth) { - std::string_view filePath{loc.file_name()}; + std::string_view const filePath{loc.file_name()}; auto idx = filePath.size(); while (maxDepth-- > 0) { idx = filePath.rfind('/', idx - 1); diff --git a/tests/unit/LoggerTests.cpp b/tests/unit/LoggerTests.cpp index a5f79929..f15247bf 100644 --- a/tests/unit/LoggerTests.cpp +++ b/tests/unit/LoggerTests.cpp @@ -20,8 +20,6 @@ #include "util/LoggerFixtures.hpp" #include "util/log/Logger.hpp" -#include -#include #include #include diff --git a/tests/unit/util/ScopeGuardTests.cpp b/tests/unit/util/ScopeGuardTests.cpp index b6cad2cc..b6f59dc8 100644 --- a/tests/unit/util/ScopeGuardTests.cpp +++ b/tests/unit/util/ScopeGuardTests.cpp @@ -27,6 +27,6 @@ TEST(ScopeGuardTest, IsCalled) testing::StrictMock> mockFunction; EXPECT_CALL(mockFunction, Call()); { - util::ScopeGuard guard([&mockFunction] { mockFunction.Call(); }); + util::ScopeGuard const guard([&mockFunction] { mockFunction.Call(); }); } }