diff --git a/Sming/SmingCore/HardwareTimer.h b/Sming/SmingCore/HardwareTimer.h index 8a16083e01..61db9ce238 100644 --- a/Sming/SmingCore/HardwareTimer.h +++ b/Sming/SmingCore/HardwareTimer.h @@ -66,7 +66,7 @@ class HardwareTimer * @retval bool True if timer started * @note Timer starts and will run for configured period then stop */ - bool __forceinline IRAM_ATTR startOnce() + __forceinline bool IRAM_ATTR startOnce() { return start(false); } @@ -126,7 +126,7 @@ class HardwareTimer /** @brief Call timer callback * @note Calls the timer callback function */ - void __forceinline IRAM_ATTR call() + __forceinline void IRAM_ATTR call() { if(callback) { callback(); diff --git a/Sming/SmingCore/Network/Http/HttpRequestAuth.cpp b/Sming/SmingCore/Network/Http/HttpRequestAuth.cpp index 31d554b63b..1cff89ef01 100644 --- a/Sming/SmingCore/Network/Http/HttpRequestAuth.cpp +++ b/Sming/SmingCore/Network/Http/HttpRequestAuth.cpp @@ -14,12 +14,6 @@ #include "HttpRequest.h" #include "../Services/WebHelpers/base64.h" -HttpBasicAuth::HttpBasicAuth(const String& username, const String& password) -{ - this->username = username; - this->password = password; -} - // Basic Auth void HttpBasicAuth::setRequest(HttpRequest* request) { @@ -27,16 +21,6 @@ void HttpBasicAuth::setRequest(HttpRequest* request) } // Digest Auth -HttpDigestAuth::HttpDigestAuth(const String& username, const String& password) -{ - this->username = username; - this->password = password; -} - -void HttpDigestAuth::setRequest(HttpRequest* request) -{ - this->request = request; -} void HttpDigestAuth::setResponse(HttpResponse* response) { diff --git a/Sming/SmingCore/Network/Http/HttpRequestAuth.h b/Sming/SmingCore/Network/Http/HttpRequestAuth.h index e3a54220ff..416410af01 100644 --- a/Sming/SmingCore/Network/Http/HttpRequestAuth.h +++ b/Sming/SmingCore/Network/Http/HttpRequestAuth.h @@ -20,14 +20,13 @@ class HttpRequest; class AuthAdapter { public: - virtual void setRequest(HttpRequest* request) = 0; - - __forceinline virtual void setResponse(HttpResponse* response) + virtual ~AuthAdapter() { - return; } - virtual ~AuthAdapter() + virtual void setRequest(HttpRequest* request) = 0; + + virtual void setResponse(HttpResponse* response) { } }; @@ -35,7 +34,11 @@ class AuthAdapter class HttpBasicAuth : public AuthAdapter { public: - HttpBasicAuth(const String& username, const String& password); + HttpBasicAuth(const String& username, const String& password) + { + this->username = username; + this->password = password; + } void setRequest(HttpRequest* request); @@ -47,9 +50,16 @@ class HttpBasicAuth : public AuthAdapter class HttpDigestAuth : public AuthAdapter { public: - HttpDigestAuth(const String& username, const String& password); + HttpDigestAuth(const String& username, const String& password) + { + this->username = username; + this->password = password; + } - void setRequest(HttpRequest* request); + void setRequest(HttpRequest* request) + { + this->request = request; + } void setResponse(HttpResponse* response); diff --git a/Sming/SmingCore/Network/TcpConnection.h b/Sming/SmingCore/Network/TcpConnection.h index bbd0066b5e..4ee29a5e1d 100644 --- a/Sming/SmingCore/Network/TcpConnection.h +++ b/Sming/SmingCore/Network/TcpConnection.h @@ -87,7 +87,7 @@ class TcpConnection int write(IDataSourceStream* stream); - __forceinline uint16_t getAvailableWriteSize() + uint16_t getAvailableWriteSize() { return (canSend && tcp) ? tcp_sndbuf(tcp) : 0; } diff --git a/Sming/SmingCore/Timer.h b/Sming/SmingCore/Timer.h index d15db90744..1d4b5077a4 100644 --- a/Sming/SmingCore/Timer.h +++ b/Sming/SmingCore/Timer.h @@ -93,7 +93,7 @@ class Timer /** @brief Start one-shot timer running * @note Will start timer and trigger once after configured duration. */ - void __forceinline IRAM_ATTR startOnce() + __forceinline void IRAM_ATTR startOnce() { start(false); }