Code Cleanup (#2191)

* constexpr const -> constexpr
* const char* -> std::string_view
This commit is contained in:
Alexander Bock
2022-07-25 15:57:45 +02:00
committed by GitHub
parent ea1f4bbf40
commit 9cc4c595a8
267 changed files with 1425 additions and 1565 deletions

View File

@@ -31,11 +31,9 @@
#include <unordered_map>
namespace {
constexpr const char* _loggerCat = "HttpSynchronization";
constexpr std::string_view _loggerCat = "HttpSynchronization";
constexpr const char* TempSuffix = ".tmp";
constexpr const int ApplicationVersion = 1;
constexpr int ApplicationVersion = 1;
struct [[codegen::Dictionary(HttpSynchronization)]] Parameters {
// The unique identifier for this resource that is used to request a set of files
@@ -164,7 +162,7 @@ bool HttpSynchronization::trySyncFromUrl(std::string listUrl) {
}
std::string filename = std::filesystem::path(line).filename().string();
std::filesystem::path destination = directory() / (filename + TempSuffix);
std::filesystem::path destination = directory() / (filename + ".tmp");
if (sizeData.find(line) != sizeData.end()) {
LWARNING(fmt::format("{}: Duplicate entry for {}", _identifier, line));