From 6d19815cd44031ff2b45fc9532f579cd81c62749 Mon Sep 17 00:00:00 2001 From: Eval EXEC Date: Sun, 6 Jul 2025 11:20:18 +0800 Subject: [PATCH] rest: replace `rf_names[0].rf` by `RESTResponseFormat::UNDEF` for code clarity --- src/rest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rest.cpp b/src/rest.cpp index ab3cd83d3d4..e32b4c3821c 100644 --- a/src/rest.cpp +++ b/src/rest.cpp @@ -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()