mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-04 18:22:57 +02:00
Merge bitcoin/bitcoin#26960: refactor: Remove c_str from util/check
fab958290brefactor: Remove c_str from util/check (MarcoFalke) Pull request description: Seems confusing and fragile to require calling code to call `c_str()` when passing a read-only view of a std::string. Fix that by using std::string_view, which can be constructed from string literals and std::string. Also, remove the now unused `c_str()` from `src/wallet/bdb.cpp`. ACKs for top commit: stickies-v: ACKfab958290baureleoules: ACKfab958290btheStack: ACKfab958290bTree-SHA512: ae39812c6bb8e2ef095e1b843774af2718f48404cb848c3e43b16d3c22240557d69d54a13a038a4a9c48b3ba0e4523e1f87abdd60f91486092f50fd43c0e8483
This commit is contained in:
@@ -663,7 +663,7 @@ BerkeleyCursor::BerkeleyCursor(BerkeleyDatabase& database)
|
||||
}
|
||||
int ret = database.m_db->cursor(nullptr, &m_cursor, 0);
|
||||
if (ret != 0) {
|
||||
throw std::runtime_error(STR_INTERNAL_BUG(strprintf("BDB Cursor could not be created. Returned %d", ret).c_str()));
|
||||
throw std::runtime_error(STR_INTERNAL_BUG(strprintf("BDB Cursor could not be created. Returned %d", ret)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user