use more libfmt instead of sprintf()

This commit is contained in:
Max Kellermann
2023-03-06 18:47:08 +01:00
parent 02d108774c
commit 415de497d3
18 changed files with 76 additions and 115 deletions

View File

@@ -3,7 +3,7 @@
#include "Database.hxx"
#include "Error.hxx"
#include "util/StringFormat.hxx"
#include "lib/fmt/ToBuffer.hxx"
namespace Sqlite {
@@ -12,8 +12,8 @@ Database::Database(const char *path)
int result = sqlite3_open(path, &db);
if (result != SQLITE_OK)
throw SqliteError(db, result,
StringFormat<1024>("Failed to open sqlite database '%s'",
path));
FmtBuffer<1024>("Failed to open sqlite database '{}'",
path));
}
} // namespace Sqlite