Skip to content

Commit b7e9dc8

Browse files
committed
Merge bitcoin/bitcoin#32884: rest: replace rf_names[0].rf by RESTResponseFormat::UNDEF
6d19815 rest: 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`: https://github.com/bitcoin/bitcoin/blob/e3f416dbf7633b2fb19c933e5508bd231cc7e9cf/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 ACK 6d19815 brunoerg: code review ACK 6d19815 Tree-SHA512: 420454f1cc09db44c1d76423d8623a0b8865d41d6c34015844ff83d78a9373e3e26f3f62818d1502b33eb063caf904750e858b74ddecd76750577ae82b64b0c1
2 parents 927055e + 6d19815 commit b7e9dc8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/rest.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ RESTResponseFormat ParseDataFormat(std::string& param, const std::string& strReq
144144

145145
// No format string is found
146146
if (pos_format == std::string::npos) {
147-
return rf_names[0].rf;
147+
return RESTResponseFormat::UNDEF;
148148
}
149149

150150
// Match format string to available formats
@@ -157,7 +157,7 @@ RESTResponseFormat ParseDataFormat(std::string& param, const std::string& strReq
157157
}
158158

159159
// If no suffix is found, return RESTResponseFormat::UNDEF and original string without query string
160-
return rf_names[0].rf;
160+
return RESTResponseFormat::UNDEF;
161161
}
162162

163163
static std::string AvailableDataFormatsString()

0 commit comments

Comments
 (0)