refactor: Fix bugprone-string-constructor warning

This commit is contained in:
MarcoFalke 2023-10-27 15:24:20 +02:00
parent 6391644b66
commit fa56067a8f
No known key found for this signature in database
2 changed files with 3 additions and 2 deletions

View file

@ -2,6 +2,7 @@ Checks: '
-*, -*,
bitcoin-*, bitcoin-*,
bugprone-argument-comment, bugprone-argument-comment,
bugprone-string-constructor,
bugprone-use-after-move, bugprone-use-after-move,
bugprone-lambda-function-name, bugprone-lambda-function-name,
misc-unused-using-decls, misc-unused-using-decls,

View file

@ -129,9 +129,9 @@ bool IsSQLiteFile(const fs::path& path)
file.close(); file.close();
// Check the magic, see https://sqlite.org/fileformat2.html // Check the magic, see https://sqlite.org/fileformat.html
std::string magic_str(magic, 16); std::string magic_str(magic, 16);
if (magic_str != std::string("SQLite format 3", 16)) { if (magic_str != std::string{"SQLite format 3\000", 16}) {
return false; return false;
} }