From fa56067a8f56701cbda95595592e74934af7d1cd Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Fri, 27 Oct 2023 15:24:20 +0200 Subject: [PATCH] refactor: Fix bugprone-string-constructor warning --- src/.clang-tidy | 1 + src/wallet/db.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/.clang-tidy b/src/.clang-tidy index 8b78f8faaa8..bfaa5ab8e7b 100644 --- a/src/.clang-tidy +++ b/src/.clang-tidy @@ -2,6 +2,7 @@ Checks: ' -*, bitcoin-*, bugprone-argument-comment, +bugprone-string-constructor, bugprone-use-after-move, bugprone-lambda-function-name, misc-unused-using-decls, diff --git a/src/wallet/db.cpp b/src/wallet/db.cpp index 0ee39d2b5a6..ea06767e9bc 100644 --- a/src/wallet/db.cpp +++ b/src/wallet/db.cpp @@ -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; }