File tree Expand file tree Collapse file tree
modules/openapi-generator/src/main/resources/cpp-libcurl
samples/client/petstore/cpp/libcurl/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -315,8 +315,7 @@ ApiResponse ApiClient::callApi(
315315 { {#authMethods} }
316316 { {#isApiKey} }
317317 // this would only be generated for apiKey authentication
318- const auto &apiKeys = m_Configuration->getApiKeys();
319- if (apiKeys.size() > 0) {
318+ if (const auto &apiKeys = m_Configuration->getApiKeys(); !apiKeys.empty()) {
320319 for (const auto &[key, value] : apiKeys) {
321320 std::string apiKey = key + " : " + value;
322321
Original file line number Diff line number Diff line change @@ -320,8 +320,7 @@ ApiResponse ApiClient::callApi(
320320 }
321321
322322 // this would only be generated for apiKey authentication
323- const auto &apiKeys = m_Configuration->getApiKeys ();
324- if (apiKeys.size () > 0 ) {
323+ if (const auto &apiKeys = m_Configuration->getApiKeys (); !apiKeys.empty ()) {
325324 for (const auto &[key, value] : apiKeys) {
326325 std::string apiKey = key + " : " + value;
327326
You can’t perform that action at this time.
0 commit comments