mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-16 02:24:58 +01:00
Merge bitcoin/bitcoin#32884: rest: replace rf_names[0].rf by RESTResponseFormat::UNDEF
6d19815cd4rest: replace `rf_names[0].rf` by `RESTResponseFormat::UNDEF` for code clarity (Eval EXEC) Pull request description: I'm reviewing the bitcoin's rest.cpp source code. In the function: `ParseDataFormat`, `rf_names[0].rf` is actualy `RESTResponseFormat::UNDEF`:e3f416dbf7/src/rest.cpp (L48-L57)so it would be more clarity and code readability to use `return RESTResponseFormat::UNDEF;` to replace `return rf_names[0].rf;` ACKs for top commit: maflcko: lgtm ACK6d19815cd4brunoerg: code review ACK6d19815cd4Tree-SHA512: 420454f1cc09db44c1d76423d8623a0b8865d41d6c34015844ff83d78a9373e3e26f3f62818d1502b33eb063caf904750e858b74ddecd76750577ae82b64b0c1
This commit is contained in:
@@ -144,7 +144,7 @@ RESTResponseFormat ParseDataFormat(std::string& param, const std::string& strReq
|
||||
|
||||
// No format string is found
|
||||
if (pos_format == std::string::npos) {
|
||||
return rf_names[0].rf;
|
||||
return RESTResponseFormat::UNDEF;
|
||||
}
|
||||
|
||||
// Match format string to available formats
|
||||
@@ -157,7 +157,7 @@ RESTResponseFormat ParseDataFormat(std::string& param, const std::string& strReq
|
||||
}
|
||||
|
||||
// If no suffix is found, return RESTResponseFormat::UNDEF and original string without query string
|
||||
return rf_names[0].rf;
|
||||
return RESTResponseFormat::UNDEF;
|
||||
}
|
||||
|
||||
static std::string AvailableDataFormatsString()
|
||||
|
||||
Reference in New Issue
Block a user