Skip to content

Commit

Permalink
Fixed minor code smells (yhirose#901)
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilLab authored Apr 9, 2021
1 parent faa5f1d commit 28e07bc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions example/ssesvr.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ using namespace std;
class EventDispatcher {
public:
EventDispatcher() {
id_ = 0;
cid_ = -1;
}

void wait_event(DataSink *sink) {
Expand All @@ -41,8 +39,8 @@ class EventDispatcher {
private:
mutex m_;
condition_variable cv_;
atomic_int id_;
atomic_int cid_;
atomic_int id_ = 0;
atomic_int cid_ = -1;
string message_;
};

Expand Down
4 changes: 2 additions & 2 deletions httplib.h
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ struct Request {
ContentReceiverWithProgress content_receiver;
Progress progress;
#ifdef CPPHTTPLIB_OPENSSL_SUPPORT
const SSL *ssl;
const SSL *ssl = nullptr;
#endif

bool has_header(const char *key) const;
Expand Down Expand Up @@ -786,7 +786,7 @@ class Server {
SocketOptions socket_options_ = default_socket_options;
};

enum Error {
enum class Error {
Success = 0,
Unknown,
Connection,
Expand Down

0 comments on commit 28e07bc

Please sign in to comment.