diff --git a/libraries/DNSServer/examples/CaptivePortalAdvanced/CaptivePortalAdvanced.ino b/libraries/DNSServer/examples/CaptivePortalAdvanced/CaptivePortalAdvanced.ino index 74e9990f..d0600e2d 100644 --- a/libraries/DNSServer/examples/CaptivePortalAdvanced/CaptivePortalAdvanced.ino +++ b/libraries/DNSServer/examples/CaptivePortalAdvanced/CaptivePortalAdvanced.ino @@ -46,7 +46,7 @@ IPAddress netMsk(255, 255, 255, 0); /** Should I connect to WLAN asap? */ -boolean connect; +bool connect; /** Last time I tried to connect to WLAN */ unsigned long lastConnectTry = 0; diff --git a/libraries/DNSServer/examples/CaptivePortalAdvanced/handleHttp.ino b/libraries/DNSServer/examples/CaptivePortalAdvanced/handleHttp.ino index fda74900..2048731a 100644 --- a/libraries/DNSServer/examples/CaptivePortalAdvanced/handleHttp.ino +++ b/libraries/DNSServer/examples/CaptivePortalAdvanced/handleHttp.ino @@ -24,7 +24,7 @@ void handleRoot() { } /** Redirect to captive portal if we got a request for another domain. Return true in that case so the page handler do not try to handle the request again. */ -boolean captivePortal() { +bool captivePortal() { if (!isIp(server.hostHeader()) && server.hostHeader() != (String(myHostname) + ".local")) { Serial.println("Request redirected to captive portal"); server.sendHeader("Location", String("http://") + toStringIp(server.client().localIP()), true); diff --git a/libraries/DNSServer/examples/CaptivePortalAdvanced/tools.ino b/libraries/DNSServer/examples/CaptivePortalAdvanced/tools.ino index 6ed7b05b..b44ffec2 100644 --- a/libraries/DNSServer/examples/CaptivePortalAdvanced/tools.ino +++ b/libraries/DNSServer/examples/CaptivePortalAdvanced/tools.ino @@ -1,5 +1,5 @@ /** Is this an IP? */ -boolean isIp(String str) { +bool isIp(String str) { for (size_t i = 0; i < str.length(); i++) { int c = str.charAt(i); if (c != '.' && (c < '0' || c > '9')) { diff --git a/libraries/SD/src/SD.h b/libraries/SD/src/SD.h index 30a48b96..2dfa7137 100644 --- a/libraries/SD/src/SD.h +++ b/libraries/SD/src/SD.h @@ -31,13 +31,13 @@ class SDClass { public: - boolean begin(uint8_t csPin, HardwareSPI &spi) { + bool begin(uint8_t csPin, HardwareSPI &spi) { SDFS.setConfig(SDFSConfig(csPin, SPI_HALF_SPEED, spi)); - return (boolean)SDFS.begin(); + return SDFS.begin(); } - boolean begin(uint8_t csPin, uint32_t cfg = SPI_HALF_SPEED, HardwareSPI &spi = SPI) { + bool begin(uint8_t csPin, uint32_t cfg = SPI_HALF_SPEED, HardwareSPI &spi = SPI) { SDFS.setConfig(SDFSConfig(csPin, cfg, spi)); - return (boolean)SDFS.begin(); + return SDFS.begin(); } void end(bool endSPI = true) { @@ -63,43 +63,43 @@ public: return open(filename.c_str(), mode); } - boolean exists(const char *filepath) { - return (boolean)SDFS.exists(filepath); + bool exists(const char *filepath) { + return SDFS.exists(filepath); } - boolean exists(const String &filepath) { - return (boolean)SDFS.exists(filepath.c_str()); + bool exists(const String &filepath) { + return SDFS.exists(filepath.c_str()); } - boolean rename(const char* filepathfrom, const char* filepathto) { - return (boolean)SDFS.rename(filepathfrom, filepathto); + bool rename(const char* filepathfrom, const char* filepathto) { + return SDFS.rename(filepathfrom, filepathto); } - boolean rename(const String &filepathfrom, const String &filepathto) { - return (boolean)rename(filepathfrom.c_str(), filepathto.c_str()); + bool rename(const String &filepathfrom, const String &filepathto) { + return rename(filepathfrom.c_str(), filepathto.c_str()); } - boolean mkdir(const char *filepath) { - return (boolean)SDFS.mkdir(filepath); + bool mkdir(const char *filepath) { + return SDFS.mkdir(filepath); } - boolean mkdir(const String &filepath) { - return (boolean)SDFS.mkdir(filepath.c_str()); + bool mkdir(const String &filepath) { + return SDFS.mkdir(filepath.c_str()); } - boolean remove(const char *filepath) { - return (boolean)SDFS.remove(filepath); + bool remove(const char *filepath) { + return SDFS.remove(filepath); } - boolean remove(const String &filepath) { + bool remove(const String &filepath) { return remove(filepath.c_str()); } - boolean rmdir(const char *filepath) { - return (boolean)SDFS.rmdir(filepath); + bool rmdir(const char *filepath) { + return SDFS.rmdir(filepath); } - boolean rmdir(const String &filepath) { + bool rmdir(const String &filepath) { return rmdir(filepath.c_str()); } diff --git a/libraries/WebServer/src/HTTPServer.cpp b/libraries/WebServer/src/HTTPServer.cpp index 4e5534c3..e95098bf 100644 --- a/libraries/WebServer/src/HTTPServer.cpp +++ b/libraries/WebServer/src/HTTPServer.cpp @@ -262,15 +262,15 @@ void HTTPServer::setContentLength(const size_t contentLength) { _contentLength = contentLength; } -void HTTPServer::enableDelay(boolean value) { +void HTTPServer::enableDelay(bool value) { _nullDelay = value; } -void HTTPServer::enableCORS(boolean value) { +void HTTPServer::enableCORS(bool value) { _corsEnabled = value; } -void HTTPServer::enableCrossOrigin(boolean value) { +void HTTPServer::enableCrossOrigin(bool value) { enableCORS(value); } diff --git a/libraries/WebServer/src/HTTPServer.h b/libraries/WebServer/src/HTTPServer.h index f5f23b33..1bc6413b 100644 --- a/libraries/WebServer/src/HTTPServer.h +++ b/libraries/WebServer/src/HTTPServer.h @@ -146,9 +146,9 @@ public: send(code, content_type, (const char *)content, contentLength); } - void enableDelay(boolean value); - void enableCORS(boolean value = true); - void enableCrossOrigin(boolean value = true); + void enableDelay(bool value); + void enableCORS(bool value = true); + void enableCrossOrigin(bool value = true); void setContentLength(const size_t contentLength); void sendHeader(const String& name, const String& value, bool first = false); @@ -235,7 +235,7 @@ protected: String value; }; - boolean _corsEnabled; + bool _corsEnabled; WiFiClient *_currentClient; HTTPMethod _currentMethod; @@ -243,7 +243,7 @@ protected: uint8_t _currentVersion; HTTPClientStatus _currentStatus; unsigned long _statusChange; - boolean _nullDelay; + bool _nullDelay; RequestHandler* _currentHandler; RequestHandler* _firstHandler; diff --git a/libraries/WebServer/src/Parsing.cpp b/libraries/WebServer/src/Parsing.cpp index b6fabdfd..71b23b72 100644 --- a/libraries/WebServer/src/Parsing.cpp +++ b/libraries/WebServer/src/Parsing.cpp @@ -339,7 +339,7 @@ int HTTPServer::_uploadReadByte(WiFiClient* client) { // keep trying until you either read a valid byte or timeout unsigned long startMillis = millis(); unsigned long timeoutIntervalMillis = client->getTimeout(); - boolean timedOut = false; + bool timedOut = false; for (;;) { if (!client->connected()) { return -1;