Skip to content

Commit 405d702

Browse files
committed
clang-format; span include
1 parent 509c66f commit 405d702

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

cpr/curlholder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#include "cpr/curlholder.h"
2+
#include "cpr/secure_string.h"
23
#include <cassert>
34
#include <curl/curl.h>
45
#include <curl/easy.h>
56
#include <string_view>
6-
#include "cpr/secure_string.h"
77

88
namespace cpr {
99
CurlHolder::CurlHolder() {

cpr/session.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -273,10 +273,7 @@ const Content& Session::GetContent() const {
273273
}
274274

275275
void Session::RemoveContent() {
276-
if (std::holds_alternative<cpr::Payload>(content_)) {
277-
curl_easy_setopt(curl_->handle, CURLOPT_POSTFIELDSIZE_LARGE, -1);
278-
curl_easy_setopt(curl_->handle, CURLOPT_COPYPOSTFIELDS, NULL);
279-
} else if (std::holds_alternative<cpr::Body>(content_)) {
276+
if (std::holds_alternative<cpr::Payload>(content_) || std::holds_alternative<cpr::Body>(content_)) {
280277
curl_easy_setopt(curl_->handle, CURLOPT_POSTFIELDSIZE_LARGE, -1);
281278
curl_easy_setopt(curl_->handle, CURLOPT_COPYPOSTFIELDS, NULL);
282279
} else if (std::holds_alternative<cpr::Multipart>(content_)) {

test/session_tests.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#include <cstdint>
44
#include <cstdlib>
55
#include <gtest/gtest.h>
6-
#include <span>
76

87
#include <stdexcept>
98
#include <string>

0 commit comments

Comments
 (0)