Remove memory_resources
This commit is contained in:
parent
ba738dd396
commit
7e7d113f83
@ -1,6 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include <iostream>
|
||||
#include <rublon/configuration.hpp>
|
||||
#include <rublon/core_handler_interface.hpp>
|
||||
#include <rublon/curl.hpp>
|
||||
@ -18,7 +17,6 @@ namespace rublon {
|
||||
template < typename HttpHandler = CURL >
|
||||
class CoreHandler : public CoreHandlerInterface< CoreHandler< HttpHandler > > {
|
||||
Configuration _config;
|
||||
|
||||
mutable std::unique_ptr< WebSocket > _ws;
|
||||
|
||||
void signRequest(Request & request) const {
|
||||
@ -69,12 +67,8 @@ class CoreHandler : public CoreHandlerInterface< CoreHandler< HttpHandler > > {
|
||||
|
||||
public:
|
||||
CoreHandler() = delete;
|
||||
|
||||
CoreHandler(const Configuration & config) : _config{config}, http{} {}
|
||||
|
||||
// CoreHandler(const CoreHandler &rhs) = delete;
|
||||
// CoreHandler(CoreHandler &&rhs) = delete;
|
||||
|
||||
tl::expected< std::reference_wrapper< const Response >, Error > validateSignature(const Response & response) const {
|
||||
if(hasSignature(response) and signatureIsNatValid(response)) {
|
||||
log(LogLevel::Error, "rublon core response is not signed properly");
|
||||
|
||||
@ -9,14 +9,6 @@
|
||||
|
||||
namespace rublon {
|
||||
|
||||
inline bool replace(std::string& str, const std::string& from, const std::string& to) {
|
||||
size_t start_pos = str.find(from);
|
||||
if(start_pos == std::string::npos)
|
||||
return false;
|
||||
str.replace(start_pos, from.length(), to);
|
||||
return true;
|
||||
}
|
||||
|
||||
namespace {
|
||||
size_t WriteMemoryCallback(void * contents, size_t size, size_t nmemb, void * userp) {
|
||||
const size_t realsize = size * nmemb;
|
||||
@ -102,7 +94,7 @@ class CURL {
|
||||
|
||||
long http_code = 0;
|
||||
curl_easy_getinfo(curl.get(), CURLINFO_RESPONSE_CODE, &http_code);
|
||||
|
||||
|
||||
if(http_code >= 500) {
|
||||
log(LogLevel::Error, "%s response with code %d ", "CURL", http_code);
|
||||
return tl::unexpected{ConnectionError{ConnectionError::HttpError, http_code}};
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
#include "rublon/utils.hpp"
|
||||
|
||||
#include <rublon/utils.hpp>
|
||||
#include <rapidjson/document.h>
|
||||
#include <rapidjson/pointer.h>
|
||||
#include <rapidjson/writer.h>
|
||||
@ -7,7 +8,6 @@
|
||||
#include <rapidjson/istreamwrapper.h>
|
||||
|
||||
#include <cstring>
|
||||
#include <memory_resource>
|
||||
namespace rublon {
|
||||
|
||||
struct RapidJSONPMRAlloc {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user