Skip to content

Commit 3cdf52d

Browse files
ci(pre-commit): Apply automatic fixes
1 parent 42cb760 commit 3cdf52d

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

examples/HeaderManipulation/HeaderManipulation.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ void setup() {
9494
< connection: close
9595
< X-Test-1: value1
9696
< X-Test-2: value2
97-
< X-Test-3:
98-
< X-Test-4:
97+
< X-Test-3:
98+
< X-Test-4:
9999
< X-Test-5: cannot be empty
100100
< X-Test-6: cannot be empty
101101
< accept-ranges: none

src/ESPAsyncWebServer.h

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ class AsyncWebHeader {
145145
[[deprecated("Use AsyncWebHeader::parse(data) instead")]]
146146
#endif
147147
AsyncWebHeader(const String &data)
148-
: AsyncWebHeader(parse(data).value_or(AsyncWebHeader(emptyString, emptyString))) {};
148+
: AsyncWebHeader(parse(data).value_or(AsyncWebHeader(emptyString, emptyString))){};
149149

150150
AsyncWebHeader &operator=(const AsyncWebHeader &) = default;
151151

@@ -306,9 +306,8 @@ class AsyncWebServerRequest {
306306
RequestedConnectionType requestedConnType() const {
307307
return _reqconntype;
308308
}
309-
bool isExpectedRequestedConnType(
310-
RequestedConnectionType erct1, RequestedConnectionType erct2 = RCT_NOT_USED, RequestedConnectionType erct3 = RCT_NOT_USED
311-
) const;
309+
bool isExpectedRequestedConnType(RequestedConnectionType erct1, RequestedConnectionType erct2 = RCT_NOT_USED, RequestedConnectionType erct3 = RCT_NOT_USED)
310+
const;
312311
bool isWebSocketUpgrade() const {
313312
return _method == HTTP_GET && isExpectedRequestedConnType(RCT_WS);
314313
}
@@ -496,8 +495,7 @@ class AsyncWebServerRequest {
496495
return beginResponse(code, contentType.c_str(), content, len, callback);
497496
}
498497
#ifndef ESP8266
499-
[[deprecated(
500-
"Replaced by beginResponse(int code, const String& contentType, const char* content = asyncsrv::empty, AwsTemplateProcessor callback = nullptr)"
498+
[[deprecated("Replaced by beginResponse(int code, const String& contentType, const char* content = asyncsrv::empty, AwsTemplateProcessor callback = nullptr)"
501499
)]]
502500
#endif
503501
AsyncWebServerResponse *beginResponse_P(int code, const String &contentType, PGM_P content, AwsTemplateProcessor callback = nullptr);

src/WebResponses.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -524,8 +524,8 @@ size_t AsyncAbstractResponse::_fillBufferAndProcessTemplates(uint8_t *data, size
524524
// Now we've read 'len' bytes, either from cache or from file
525525
// Search for template placeholders
526526
uint8_t *pTemplateStart = data;
527-
while ((pTemplateStart < &data[len])
528-
&& (pTemplateStart = (uint8_t *)memchr(pTemplateStart, TEMPLATE_PLACEHOLDER, &data[len - 1] - pTemplateStart + 1))) { // data[0] ... data[len - 1]
527+
while ((pTemplateStart < &data[len]) && (pTemplateStart = (uint8_t *)memchr(pTemplateStart, TEMPLATE_PLACEHOLDER, &data[len - 1] - pTemplateStart + 1))
528+
) { // data[0] ... data[len - 1]
529529
uint8_t *pTemplateEnd =
530530
(pTemplateStart < &data[len - 1]) ? (uint8_t *)memchr(pTemplateStart + 1, TEMPLATE_PLACEHOLDER, &data[len - 1] - pTemplateStart) : nullptr;
531531
// temporary buffer to hold parameter name

0 commit comments

Comments
 (0)