Skip to content

Commit

Permalink
clang-format; span include
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Mueller authored and Simon Mueller committed Feb 14, 2025
1 parent 509c66f commit 6dc4338
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cpr/curlholder.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#include "cpr/curlholder.h"
#include "cpr/secure_string.h"
#include <cassert>
#include <curl/curl.h>
#include <curl/easy.h>
#include <string_view>
#include "cpr/secure_string.h"

namespace cpr {
CurlHolder::CurlHolder() {
Expand Down
5 changes: 1 addition & 4 deletions cpr/session.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,10 +273,7 @@ const Content& Session::GetContent() const {
}

void Session::RemoveContent() {
if (std::holds_alternative<cpr::Payload>(content_)) {
curl_easy_setopt(curl_->handle, CURLOPT_POSTFIELDSIZE_LARGE, -1);
curl_easy_setopt(curl_->handle, CURLOPT_COPYPOSTFIELDS, NULL);
} else if (std::holds_alternative<cpr::Body>(content_)) {
if (std::holds_alternative<cpr::Payload>(content_) || std::holds_alternative<cpr::Body>(content_)) {
curl_easy_setopt(curl_->handle, CURLOPT_POSTFIELDSIZE_LARGE, -1);
curl_easy_setopt(curl_->handle, CURLOPT_COPYPOSTFIELDS, NULL);
} else if (std::holds_alternative<cpr::Multipart>(content_)) {
Expand Down
1 change: 0 additions & 1 deletion test/session_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#include <cstdint>
#include <cstdlib>
#include <gtest/gtest.h>
#include <span>

#include <stdexcept>
#include <string>
Expand Down

0 comments on commit 6dc4338

Please sign in to comment.