From ffae48d280230c687766e06b0fe1b0e0fdfc53d8 Mon Sep 17 00:00:00 2001 From: Ihor Drachuk Date: Thu, 28 Mar 2024 12:25:11 +0200 Subject: [PATCH] Fix SA warnings --- headers/alog/record.h | 4 ++-- headers/alog/tools_filesystem.h | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/headers/alog/record.h b/headers/alog/record.h index f79a5ae..98a5c79 100644 --- a/headers/alog/record.h +++ b/headers/alog/record.h @@ -892,5 +892,5 @@ ALog::Record&& operator<< (ALog::Record&& record, const std::chrono::duration inline ALog::Record& operator<< (ALog::Record& record, T&& value) { std::move(record) << std::forward(value); return record; } -template inline ALog::Record& operator<< (ALog::Record& record, const T& value) { std::move(record) << value; return record; } +template inline ALog::Record& operator<< (ALog::Record& record, T&& value) { return (std::move(record) << std::forward(value)); } +template inline ALog::Record& operator<< (ALog::Record& record, const T& value) { return (std::move(record) << value); } diff --git a/headers/alog/tools_filesystem.h b/headers/alog/tools_filesystem.h index 043148a..b15d17e 100644 --- a/headers/alog/tools_filesystem.h +++ b/headers/alog/tools_filesystem.h @@ -7,15 +7,15 @@ #if __has_include() #include - static bool fsExists(const std::filesystem::directory_entry& x) { + inline bool fsExists(const std::filesystem::directory_entry& x) { return x.exists(); } - static bool fsIsDirectory(const std::filesystem::directory_entry& x) { + inline bool fsIsDirectory(const std::filesystem::directory_entry& x) { return x.is_directory(); } - static uintmax_t fsSize(const std::filesystem::directory_entry& x) { + inline uintmax_t fsSize(const std::filesystem::directory_entry& x) { return x.file_size(); } #else @@ -25,15 +25,15 @@ using namespace experimental; } // namespace std - static bool fsExists(const std::filesystem::directory_entry& x) { + inline bool fsExists(const std::filesystem::directory_entry& x) { return std::filesystem::exists(x); } - static bool fsIsDirectory(const std::filesystem::directory_entry& x) { + inline bool fsIsDirectory(const std::filesystem::directory_entry& x) { return std::filesystem::is_directory(x); } - static uintmax_t fsSize(const std::filesystem::directory_entry& x) { + inline uintmax_t fsSize(const std::filesystem::directory_entry& x) { return std::filesystem::file_size(x); } #endif // __has_include()