implement recommendations from reviewers

* simplified transition bugfix
* removed cast same type
* isIp parameter changed to pass-by-reference, to avoid copy constructor
This commit is contained in:
Frank
2025-01-09 12:12:53 +01:00
committed by Damian Schneider
parent 013684b5ca
commit b6f74287d0
4 changed files with 8 additions and 8 deletions

View File

@@ -21,7 +21,7 @@ static const char s_accessdenied[] PROGMEM = "Access Denied";
static const char _common_js[] PROGMEM = "/common.js";
//Is this an IP?
static bool isIp(const String str) {
static bool isIp(const String &str) {
for (size_t i = 0; i < str.length(); i++) {
int c = str.charAt(i);
if (c != '.' && (c < '0' || c > '9')) {