Skip to content

Commit d089c84

Browse files
committed
Some code cleanup
1 parent 07906dd commit d089c84

File tree

8 files changed

+24
-24
lines changed

8 files changed

+24
-24
lines changed

hardware/DomoticzTCP.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ class DomoticzTCP : public CDomoticzHardwareBase
3232
void disconnectTCP();
3333
bool StartHardwareTCP();
3434
bool StopHardwareTCP();
35-
bool StartHardware();
36-
bool StopHardware();
35+
bool StartHardware() override;
36+
bool StopHardware() override;
3737
void writeTCP(const char *data, size_t size);
3838
void Do_Work();
3939
bool ConnectInternal();

hardware/MySensorsBase.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,13 +322,13 @@ class MySensorsBase : public CDomoticzHardwareBase
322322
std::string _Payload;
323323
bool _bUseAck;
324324
int _AckTimeout;
325-
_tMySensorSmartSleepQueueItem(const int NodeID, const int ChildID, const _eMessageType messageType, const _eSetType SubType, const std::string &Payload, const bool bUseAck, const int AckTimeout)
325+
_tMySensorSmartSleepQueueItem(const int NodeID, const int ChildID, const _eMessageType messageType, const _eSetType SubType, const std::string &Payload, const bool bUseAck, const int AckTimeout):
326+
_Payload(Payload)
326327
{
327328
_NodeID = NodeID;
328329
_ChildID = ChildID;
329330
_messageType = messageType;
330331
_SubType = SubType;
331-
_Payload = Payload;
332332
_bUseAck = bUseAck;
333333
_AckTimeout = AckTimeout;
334334
}

main/WebServer.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,10 @@ class CWebServer : public session_store, public boost::enable_shared_from_this<C
9797
const std::string &hardwareid = ""); // OTO
9898

9999
// SessionStore interface
100-
const WebEmStoredSession GetSession(const std::string & sessionId);
101-
void StoreSession(const WebEmStoredSession & session);
102-
void RemoveSession(const std::string & sessionId);
103-
void CleanSessions();
100+
const WebEmStoredSession GetSession(const std::string & sessionId) override;
101+
void StoreSession(const WebEmStoredSession & session) override;
102+
void RemoveSession(const std::string & sessionId) override;
103+
void CleanSessions() override;
104104
void RemoveUsersSessions(const std::string& username, const WebEmSession & exceptSession);
105105
std::string PluginHardwareDesc(int HwdID);
106106

tcpserver/TCPClient.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ class CTCPClient : public CTCPClientBase,
4343
public:
4444
CTCPClient(boost::asio::io_service& ios, CTCPServerIntBase *pManager);
4545
~CTCPClient();
46-
virtual void start();
47-
virtual void stop();
48-
virtual void write(const char *pData, size_t Length);
46+
virtual void start() override;
47+
virtual void stop() override;
48+
virtual void write(const char *pData, size_t Length) override;
4949
private:
5050
void handleRead(const boost::system::error_code& error, size_t length);
5151
void handleWrite(const boost::system::error_code& error);
@@ -62,9 +62,9 @@ class CSharedClient : public CTCPClientBase,
6262
public:
6363
CSharedClient(CTCPServerIntBase *pManager, boost::shared_ptr<http::server::CProxyClient> proxy, const std::string &token, const std::string &username);
6464
~CSharedClient();
65-
virtual void start();
66-
virtual void stop();
67-
virtual void write(const char *pData, size_t Length);
65+
virtual void start() override;
66+
virtual void stop() override;
67+
virtual void write(const char *pData, size_t Length) override;
6868
void OnIncomingData(const unsigned char *data, size_t bytes_transferred);
6969
bool CompareToken(const std::string &token);
7070
private:

tcpserver/TCPServer.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,10 @@ class CTCPServerInt : public CTCPServerIntBase {
7272
public:
7373
CTCPServerInt(const std::string& address, const std::string& port, CTCPServer *pRoot);
7474
~CTCPServerInt(void);
75-
virtual void start();
76-
virtual void stop();
75+
virtual void start() override;
76+
virtual void stop() override;
7777
/// Stop the specified connection.
78-
virtual void stopClient(CTCPClient_ptr c);
78+
virtual void stopClient(CTCPClient_ptr c) override;
7979
private:
8080

8181
void handleAccept(const boost::system::error_code& error);
@@ -99,10 +99,10 @@ class CTCPServerProxied : public CTCPServerIntBase {
9999
public:
100100
CTCPServerProxied(CTCPServer *pRoot, boost::shared_ptr<http::server::CProxyClient> proxy);
101101
~CTCPServerProxied(void);
102-
virtual void start();
103-
virtual void stop();
102+
virtual void start() override;
103+
virtual void stop() override;
104104
/// Stop the specified connection.
105-
virtual void stopClient(CTCPClient_ptr c);
105+
virtual void stopClient(CTCPClient_ptr c) override;
106106

107107
bool OnNewConnection(const std::string &token, const std::string &username, const std::string &password);
108108
bool OnDisconnect(const std::string &token);

webserver/cWebem.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ namespace http {
121121
{}
122122

123123
/// Handle a request and produce a reply.
124-
virtual void handle_request(const request& req, reply& rep);
124+
virtual void handle_request(const request& req, reply& rep) override;
125125
private:
126126
char *strftime_t(const char *format, const time_t rawtime);
127127
bool CompressWebOutput(const request& req, reply& rep);

webserver/server.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class server : public server_base {
7878
virtual ~server() {}
7979

8080
/// Print server settings to string (debug purpose)
81-
virtual std::string to_string() const {
81+
virtual std::string to_string() const override {
8282
return "'server[" + settings_.to_string() + "]'";
8383
}
8484
protected:
@@ -100,7 +100,7 @@ class ssl_server : public server_base {
100100
virtual ~ssl_server() {}
101101

102102
/// Print server settings to string (debug purpose)
103-
virtual std::string to_string() const {
103+
virtual std::string to_string() const override {
104104
return "'ssl_server[" + settings_.to_string() + "]'";
105105
}
106106

webserver/server_settings.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ struct ssl_server_settings : public server_settings {
243243
verify_file_path = server_settings::get_valid_value(verify_file_path, ssl_settings.verify_file_path);
244244
}
245245

246-
virtual std::string to_string() const {
246+
virtual std::string to_string() const override {
247247
return std::string("ssl_server_settings[") + server_settings::to_string() +
248248
", ssl_method='" + ssl_method + "'" +
249249
", certificate_chain_file_path='" + certificate_chain_file_path + "'" +

0 commit comments

Comments
 (0)