refactor: Fix bugprone-string-constructor warning

pull/28741/head
MarcoFalke 1 year ago
parent 6391644b66
commit fa56067a8f
No known key found for this signature in database

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

@ -129,9 +129,9 @@ bool IsSQLiteFile(const fs::path& path)
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);
if (magic_str != std::string("SQLite format 3", 16)) {
if (magic_str != std::string{"SQLite format 3\000", 16}) {
return false;
}

Loading…
Cancel
Save