Merge branch 'main' into settings

This commit is contained in:
HJfod 2024-08-13 13:42:37 +03:00
commit 05a4daf794

View file

@ -188,7 +188,7 @@ std::optional<float> WebProgress::uploadProgress() const {
class WebRequest::Impl { class WebRequest::Impl {
public: public:
static std::atomic_size_t s_counter; static std::atomic_size_t s_idCounter;
std::string m_method; std::string m_method;
std::string m_url; std::string m_url;
@ -207,7 +207,7 @@ public:
HttpVersion m_httpVersion = HttpVersion::DEFAULT; HttpVersion m_httpVersion = HttpVersion::DEFAULT;
size_t m_id; size_t m_id;
Impl() : m_id(s_counter++) {} Impl() : m_id(s_idCounter++) {}
WebResponse makeError(int code, std::string const& msg) { WebResponse makeError(int code, std::string const& msg) {
auto res = WebResponse(); auto res = WebResponse();
@ -217,6 +217,8 @@ public:
} }
}; };
std::atomic_size_t WebRequest::Impl::s_idCounter = 0;
WebRequest::WebRequest() : m_impl(std::make_shared<Impl>()) {} WebRequest::WebRequest() : m_impl(std::make_shared<Impl>()) {}
WebRequest::~WebRequest() {} WebRequest::~WebRequest() {}