Bug fix/clang-tidy-performance (#300)

Various clang-tidy-performance fixes:
* noexcept
* performance-noexcept-swap
* performance
* performance-move-const-arg
* performance-unnecessary-value-param
* performance-inefficient-vector-operation
* performance-no-int-to-ptr
* add performance
* performance-inefficient-string-concatenation
* clang-analyzer-deadcode.DeadStores
* performance-inefficient-vector-operation
* clang-analyzer-core.NullDereference
* clang-analyzer-core.UndefinedBinaryOperatorResult
* clang-analyzer-core.CallAndMessage

---------

Co-authored-by: gtsoul-tech <gtsoulkanakis@gmail.com>
This commit is contained in:
gtsoul-tech
2024-06-20 14:57:19 +03:00
committed by GitHub
parent 0e0c9f8c63
commit 0f4369bf22
40 changed files with 171 additions and 170 deletions

View File

@@ -337,7 +337,9 @@ void clearDir(const string &path) {
if (name == "." || name == "..") {
continue;
}
string f = path + '/' + name;
string f = path;
f += '/';
f += name;
if (unlink(f.c_str()) < 0) {
printf("ERROR: couldn't remove file %s: %s\n", f.c_str(),
strerror(errno));