clang-tidy: Fix performance-move-const-arg in headers

See https://clang.llvm.org/extra/clang-tidy/checks/performance/move-const-arg.html
This commit is contained in:
Hennadii Stepanov 2023-01-17 12:56:02 +00:00
parent 3fef2944ad
commit 0a5dc030b9
No known key found for this signature in database
GPG Key ID: 410108112E7EA81F

View File

@ -35,7 +35,7 @@ public:
// Allow path objects arguments for compatibility.
path(std::filesystem::path path) : std::filesystem::path::path(std::move(path)) {}
path& operator=(std::filesystem::path path) { std::filesystem::path::operator=(std::move(path)); return *this; }
path& operator/=(std::filesystem::path path) { std::filesystem::path::operator/=(std::move(path)); return *this; }
path& operator/=(std::filesystem::path path) { std::filesystem::path::operator/=(path); return *this; }
// Allow literal string arguments, which are safe as long as the literals are ASCII.
path(const char* c) : std::filesystem::path(c) {}