Avoid warning about unqualified std cast

This commit is contained in:
Martchus 2022-11-04 16:50:13 +01:00
parent a9ea4f4f47
commit d8c38699ba
3 changed files with 7 additions and 7 deletions

View File

@ -1531,7 +1531,7 @@ void ArgumentParser::printBashCompletion(int argc, const char *const *argv, unsi
if (dir.size() > 1 && (dir[dir.size() - 2] == '\"' || dir[dir.size() - 2] == '\'')) { if (dir.size() > 1 && (dir[dir.size() - 2] == '\"' || dir[dir.size() - 2] == '\'')) {
dir.erase(dir.size() - 2, 1); dir.erase(dir.size() - 2, 1);
} }
actualDir = move(dir); actualDir = std::move(dir);
} }
// determine the "file" part // determine the "file" part
string file = fileName(unescapedOpening); string file = fileName(unescapedOpening);
@ -1541,7 +1541,7 @@ void ArgumentParser::printBashCompletion(int argc, const char *const *argv, unsi
if (file.size() > 1 && (file[file.size() - 2] == '\"' || file[file.size() - 2] == '\'')) { if (file.size() > 1 && (file[file.size() - 2] == '\"' || file[file.size() - 2] == '\'')) {
file.erase(file.size() - 2, 1); file.erase(file.size() - 2, 1);
} }
actualFile = move(file); actualFile = std::move(file);
} }
// -> completion for files and dirs // -> completion for files and dirs

View File

@ -437,10 +437,10 @@ pair<unique_ptr<std::uint8_t[]>, std::uint32_t> decodeBase64(const char *encoded
case 1: case 1:
*++iter = static_cast<std::uint8_t>((temp >> 16) & 0xFF); *++iter = static_cast<std::uint8_t>((temp >> 16) & 0xFF);
*++iter = static_cast<std::uint8_t>((temp >> 8) & 0xFF); *++iter = static_cast<std::uint8_t>((temp >> 8) & 0xFF);
return make_pair(move(buffer), decodedSize); return make_pair(std::move(buffer), decodedSize);
case 2: case 2:
*++iter = static_cast<std::uint8_t>((temp >> 10) & 0xFF); *++iter = static_cast<std::uint8_t>((temp >> 10) & 0xFF);
return make_pair(move(buffer), decodedSize); return make_pair(std::move(buffer), decodedSize);
default: default:
throw ConversionException("invalid padding in base64"); throw ConversionException("invalid padding in base64");
} }
@ -452,6 +452,6 @@ pair<unique_ptr<std::uint8_t[]>, std::uint32_t> decodeBase64(const char *encoded
*++iter = static_cast<std::uint8_t>((temp >> 8) & 0xFF); *++iter = static_cast<std::uint8_t>((temp >> 8) & 0xFF);
*++iter = static_cast<std::uint8_t>(temp & 0xFF); *++iter = static_cast<std::uint8_t>(temp & 0xFF);
} }
return make_pair(move(buffer), decodedSize); return make_pair(std::move(buffer), decodedSize);
} }
} // namespace CppUtilities } // namespace CppUtilities

View File

@ -174,11 +174,11 @@ TestApplication::TestApplication(int argc, const char *const *argv)
// -> read TEST_FILE_PATH environment variable // -> read TEST_FILE_PATH environment variable
bool hasTestFilePathFromEnv; bool hasTestFilePathFromEnv;
if (auto testFilePathFromEnv = readTestfilePathFromEnv(); (hasTestFilePathFromEnv = !testFilePathFromEnv.empty())) { if (auto testFilePathFromEnv = readTestfilePathFromEnv(); (hasTestFilePathFromEnv = !testFilePathFromEnv.empty())) {
m_testFilesPaths.emplace_back(move(testFilePathFromEnv)); m_testFilesPaths.emplace_back(std::move(testFilePathFromEnv));
} }
// -> find source directory // -> find source directory
if (auto testFilePathFromSrcDirRef = readTestfilePathFromSrcRef(); !testFilePathFromSrcDirRef.empty()) { if (auto testFilePathFromSrcDirRef = readTestfilePathFromSrcRef(); !testFilePathFromSrcDirRef.empty()) {
m_testFilesPaths.emplace_back(move(testFilePathFromSrcDirRef)); m_testFilesPaths.emplace_back(std::move(testFilePathFromSrcDirRef));
} }
// -> try testfiles directory in working directory // -> try testfiles directory in working directory
m_testFilesPaths.emplace_back("./testfiles/"); m_testFilesPaths.emplace_back("./testfiles/");