-
Notifications
You must be signed in to change notification settings - Fork 262
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: Use string_view for json_tests
This avoids a static constructor of the global std::string, and rules out possibly expensive and implicit copies of the string completely.
- Loading branch information
MarcoFalke
committed
Sep 3, 2024
1 parent
9cb9651
commit fac9736
Showing
3 changed files
with
13 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
// Copyright (c) 2023 The Bitcoin Core developers | ||
// Copyright (c) 2023-present The Bitcoin Core developers | ||
// Distributed under the MIT software license, see the accompanying | ||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||
|
||
#ifndef BITCOIN_TEST_UTIL_JSON_H | ||
#define BITCOIN_TEST_UTIL_JSON_H | ||
|
||
#include <string> | ||
|
||
#include <univalue.h> | ||
|
||
UniValue read_json(const std::string& jsondata); | ||
#include <string_view> | ||
|
||
UniValue read_json(std::string_view jsondata); | ||
|
||
#endif // BITCOIN_TEST_UTIL_JSON_H |