Fixed minor code smells (#901)
This commit is contained in:
parent
faa5f1d802
commit
28e07bca16
@ -20,8 +20,6 @@ using namespace std;
|
|||||||
class EventDispatcher {
|
class EventDispatcher {
|
||||||
public:
|
public:
|
||||||
EventDispatcher() {
|
EventDispatcher() {
|
||||||
id_ = 0;
|
|
||||||
cid_ = -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void wait_event(DataSink *sink) {
|
void wait_event(DataSink *sink) {
|
||||||
@ -41,8 +39,8 @@ public:
|
|||||||
private:
|
private:
|
||||||
mutex m_;
|
mutex m_;
|
||||||
condition_variable cv_;
|
condition_variable cv_;
|
||||||
atomic_int id_;
|
atomic_int id_ = 0;
|
||||||
atomic_int cid_;
|
atomic_int cid_ = -1;
|
||||||
string message_;
|
string message_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -395,7 +395,7 @@ struct Request {
|
|||||||
ContentReceiverWithProgress content_receiver;
|
ContentReceiverWithProgress content_receiver;
|
||||||
Progress progress;
|
Progress progress;
|
||||||
#ifdef CPPHTTPLIB_OPENSSL_SUPPORT
|
#ifdef CPPHTTPLIB_OPENSSL_SUPPORT
|
||||||
const SSL *ssl;
|
const SSL *ssl = nullptr;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool has_header(const char *key) const;
|
bool has_header(const char *key) const;
|
||||||
@ -786,7 +786,7 @@ private:
|
|||||||
SocketOptions socket_options_ = default_socket_options;
|
SocketOptions socket_options_ = default_socket_options;
|
||||||
};
|
};
|
||||||
|
|
||||||
enum Error {
|
enum class Error {
|
||||||
Success = 0,
|
Success = 0,
|
||||||
Unknown,
|
Unknown,
|
||||||
Connection,
|
Connection,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user