mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-26 14:45:52 +00:00
style: clang-tidy auto fixes (#2420)
This commit is contained in:
committed by
GitHub
parent
9420c506ca
commit
333b73e882
@@ -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(
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
#include <spdlog/async_logger.h>
|
||||
#include <spdlog/common.h>
|
||||
#include <spdlog/logger.h>
|
||||
#include <spdlog/sinks/basic_file_sink.h>
|
||||
#include <spdlog/sinks/rotating_file_sink.h>
|
||||
#include <spdlog/sinks/stdout_color_sinks.h>
|
||||
#include <spdlog/spdlog.h>
|
||||
@@ -344,7 +343,7 @@ Logger::Pump::Pump(std::shared_ptr<spdlog::logger> 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<spdlog::logger> 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);
|
||||
|
||||
@@ -20,8 +20,6 @@
|
||||
#include "util/LoggerFixtures.hpp"
|
||||
#include "util/log/Logger.hpp"
|
||||
|
||||
#include <fmt/format.h>
|
||||
#include <gmock/gmock.h>
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
@@ -27,6 +27,6 @@ TEST(ScopeGuardTest, IsCalled)
|
||||
testing::StrictMock<testing::MockFunction<void()>> mockFunction;
|
||||
EXPECT_CALL(mockFunction, Call());
|
||||
{
|
||||
util::ScopeGuard guard([&mockFunction] { mockFunction.Call(); });
|
||||
util::ScopeGuard const guard([&mockFunction] { mockFunction.Call(); });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user