Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -232,14 +232,15 @@ jobs:
- uses: actions/setup-python@v6
- name: Install meson
run: pip install meson
- name: Setup MSVC environment
uses: ilammy/msvc-dev-cmd@v1
- name: Checkout
uses: actions/checkout@v5
- name: "Build & Test"
env:
CMAKE_GENERATOR: "Visual Studio 17 2022"
CPR_BUILD_TESTS: ON
CPR_BUILD_TESTS_SSL: OFF
CURL_USE_LIBPSL: OFF
uses: ashutoshvarma/action-cmake-build@master
with:
build-dir: ${{ github.workspace }}/build
Expand All @@ -254,6 +255,8 @@ jobs:
- uses: actions/setup-python@v6
- name: Install meson
run: pip install meson
- name: Setup MSVC environment
uses: ilammy/msvc-dev-cmd@v1
- name: Install OpenSSL
run: choco install openssl -y
- name: Checkout
Expand All @@ -264,7 +267,6 @@ jobs:
CPR_BUILD_TESTS: ON
CPR_BUILD_TESTS_SSL: ON
CPR_FORCE_OPENSSL_BACKEND: ON
CURL_USE_LIBPSL: OFF
uses: ashutoshvarma/action-cmake-build@master
with:
build-dir: ${{ github.workspace }}/build
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.15)
project(cpr VERSION 1.14.0 LANGUAGES CXX)
project(cpr VERSION 1.14.1 LANGUAGES CXX)

math(EXPR cpr_VERSION_NUM "${cpr_VERSION_MAJOR} * 0x10000 + ${cpr_VERSION_MINOR} * 0x100 + ${cpr_VERSION_PATCH}" OUTPUT_FORMAT HEXADECIMAL)
configure_file("${cpr_SOURCE_DIR}/cmake/cprver.h.in" "${cpr_BINARY_DIR}/cpr_generated_includes/cpr/cprver.h")
Expand Down
6 changes: 4 additions & 2 deletions cpr/sse.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#include "cpr/sse.h"

#include <charconv>
#include <utility>
#include <cstddef>
#include <functional>
#include <string>
#include <string_view>
#include <system_error>
#include <utility>

namespace cpr {

Expand Down Expand Up @@ -87,7 +87,9 @@ bool ServerSentEventParser::processLine(const std::string& line, const std::func
// Parse retry value as integer
size_t retry_value = 0;
const std::string_view sv(value);
auto [ptr, ec] = std::from_chars(sv.begin(), sv.end(), retry_value);
const char* begin = sv.data();
const char* end = begin + sv.size(); // NOLINT (cppcoreguidelines-pro-bounds-pointer-arithmetic) Required here since Windows and Clang/GCC have different std::string_view iterator implementations
auto [ptr, ec] = std::from_chars(begin, end, retry_value);
if (ec == std::errc()) {
current_event_.retry = retry_value;
}
Expand Down
Loading