mirror of
https://github.com/BlackMATov/curly.hpp.git
synced 2025-12-16 14:11:17 +07:00
Happy New Year 🥳
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (C) 2019-2021, by Matvey Cherevko (blackmatov@gmail.com)
|
Copyright (C) 2019-2022, by Matvey Cherevko (blackmatov@gmail.com)
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* This file is part of the "https://github.com/blackmatov/curly.hpp"
|
* This file is part of the "https://github.com/blackmatov/curly.hpp"
|
||||||
* For conditions of distribution and use, see copyright notice in LICENSE.md
|
* For conditions of distribution and use, see copyright notice in LICENSE.md
|
||||||
* Copyright (C) 2019-2021, by Matvey Cherevko (blackmatov@gmail.com)
|
* Copyright (C) 2019-2022, by Matvey Cherevko (blackmatov@gmail.com)
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* This file is part of the "https://github.com/blackmatov/curly.hpp"
|
* This file is part of the "https://github.com/blackmatov/curly.hpp"
|
||||||
* For conditions of distribution and use, see copyright notice in LICENSE.md
|
* For conditions of distribution and use, see copyright notice in LICENSE.md
|
||||||
* Copyright (C) 2019-2021, by Matvey Cherevko (blackmatov@gmail.com)
|
* Copyright (C) 2019-2022, by Matvey Cherevko (blackmatov@gmail.com)
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
#include <curly.hpp/curly.hpp>
|
#include <curly.hpp/curly.hpp>
|
||||||
@@ -35,6 +35,7 @@ namespace
|
|||||||
public:
|
public:
|
||||||
using data_t = std::vector<char>;
|
using data_t = std::vector<char>;
|
||||||
|
|
||||||
|
[[maybe_unused]]
|
||||||
explicit default_uploader(const data_t* src) noexcept
|
explicit default_uploader(const data_t* src) noexcept
|
||||||
: data_(*src)
|
: data_(*src)
|
||||||
, size_(src->size()) {}
|
, size_(src->size()) {}
|
||||||
@@ -59,6 +60,7 @@ namespace
|
|||||||
public:
|
public:
|
||||||
using data_t = std::vector<char>;
|
using data_t = std::vector<char>;
|
||||||
|
|
||||||
|
[[maybe_unused]]
|
||||||
explicit default_downloader(data_t* dst) noexcept
|
explicit default_downloader(data_t* dst) noexcept
|
||||||
: data_(*dst) {}
|
: data_(*dst) {}
|
||||||
|
|
||||||
@@ -72,6 +74,7 @@ namespace
|
|||||||
|
|
||||||
class default_progressor final : public progress_handler {
|
class default_progressor final : public progress_handler {
|
||||||
public:
|
public:
|
||||||
|
[[maybe_unused]]
|
||||||
default_progressor() = default;
|
default_progressor() = default;
|
||||||
|
|
||||||
float update(
|
float update(
|
||||||
@@ -251,6 +254,7 @@ namespace
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[[maybe_unused]]
|
||||||
~curl_state() noexcept {
|
~curl_state() noexcept {
|
||||||
std::lock_guard<std::mutex> guard(mutex_);
|
std::lock_guard<std::mutex> guard(mutex_);
|
||||||
curl_multi_cleanup(curlm_);
|
curl_multi_cleanup(curlm_);
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* This file is part of the "https://github.com/blackmatov/curly.hpp"
|
* This file is part of the "https://github.com/blackmatov/curly.hpp"
|
||||||
* For conditions of distribution and use, see copyright notice in LICENSE.md
|
* For conditions of distribution and use, see copyright notice in LICENSE.md
|
||||||
* Copyright (C) 2019-2021, by Matvey Cherevko (blackmatov@gmail.com)
|
* Copyright (C) 2019-2022, by Matvey Cherevko (blackmatov@gmail.com)
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
#include "doctest/doctest.h"
|
#include "doctest/doctest.hpp"
|
||||||
|
|
||||||
#include <curly.hpp/curly.hpp>
|
#include <curly.hpp/curly.hpp>
|
||||||
namespace net = curly_hpp;
|
namespace net = curly_hpp;
|
||||||
|
|||||||
@@ -1,7 +1,16 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#ifdef __clang__
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wreserved-identifier"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "doctest.h"
|
#include "doctest.h"
|
||||||
|
|
||||||
|
#ifdef __clang__
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
#define STATIC_REQUIRE(...)\
|
#define STATIC_REQUIRE(...)\
|
||||||
static_assert(__VA_ARGS__, #__VA_ARGS__);\
|
static_assert(__VA_ARGS__, #__VA_ARGS__);\
|
||||||
REQUIRE(__VA_ARGS__);
|
REQUIRE(__VA_ARGS__);
|
||||||
|
|||||||
Reference in New Issue
Block a user