clang format

This commit is contained in:
gabime
2024-01-13 09:37:32 +02:00
parent 4789065700
commit 77b07b3a10
75 changed files with 502 additions and 834 deletions

View File

@@ -11,7 +11,7 @@
#include "spdlog/common.h"
#include "spdlog/details/file_helper.h"
#include "spdlog/details/os.h"
//#include "spdlog/fmt/fmt.h"
// #include "spdlog/fmt/fmt.h"
namespace spdlog {
namespace sinks {
@@ -113,9 +113,9 @@ void rotating_file_sink<Mutex>::rotate_() {
file_helper_.reopen(true); // truncate the log file anyway to prevent it
// to grow beyond its limit!
current_size_ = 0;
throw_spdlog_ex("rotating_file_sink: failed renaming " + filename_to_str(src) +
" to " + filename_to_str(target),
errno);
throw_spdlog_ex(
"rotating_file_sink: failed renaming " + filename_to_str(src) + " to " + filename_to_str(target),
errno);
}
}
}
@@ -125,8 +125,7 @@ void rotating_file_sink<Mutex>::rotate_() {
// delete the target if exists, and rename the src file to target
// return true on success, false otherwise.
template <typename Mutex>
bool rotating_file_sink<Mutex>::rename_file_(const filename_t &src_filename,
const filename_t &target_filename) {
bool rotating_file_sink<Mutex>::rename_file_(const filename_t &src_filename, const filename_t &target_filename) {
// try to delete the target file in case it already exists.
(void)details::os::remove(target_filename);
return details::os::rename(src_filename, target_filename) == 0;