From 3a79df77b1d9bde38d2461c6e680fbefae83cfd9 Mon Sep 17 00:00:00 2001 From: Shinichi Umegane Date: Thu, 29 Aug 2024 21:10:00 +0900 Subject: [PATCH] Fix clang-tidy warnings --- src/limestone/rotation_task.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/limestone/rotation_task.cpp b/src/limestone/rotation_task.cpp index 1e433b8c..549fa600 100644 --- a/src/limestone/rotation_task.cpp +++ b/src/limestone/rotation_task.cpp @@ -16,7 +16,6 @@ #include #include -#include #include "logging_helper.h" #include @@ -73,11 +72,10 @@ void rotation_task::rotate() { if (error == boost::system::errc::no_such_file_or_directory || !result) { LOG_LP(INFO) << "File does not exist, skipping: " << lc->file_path(); continue; - } else { - // For any other errors - LOG_LP(ERROR) << "Failed to check if file exists: " << lc->file_path() << ", error_code: " << error.message(); - throw std::runtime_error("Failed to check if file exists: " + lc->file_path().string()); } + // For any other errors + LOG_LP(ERROR) << "Failed to check if file exists: " << lc->file_path() << ", error_code: " << error.message(); + throw std::runtime_error("Failed to check if file exists: " + lc->file_path().string()); } // The following code may seem necessary at first glance, but there is a possibility