mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
Format with clang
This commit is contained in:
@@ -630,12 +630,15 @@ void skipBrackets(const std::string & expr, size_t & pos, const int direction) {
|
||||
int i = pos;
|
||||
char open = '(', close = ')';
|
||||
if (direction == -1) {
|
||||
open = ')'; close = '(';
|
||||
open = ')';
|
||||
close = '(';
|
||||
}
|
||||
size_t depth = 1;
|
||||
while ((i >= 0) && (i < expr.size()) && depth > 0) {
|
||||
if (expr[i] == open) depth++;
|
||||
if (expr[i] == close) depth--;
|
||||
if (expr[i] == open)
|
||||
depth++;
|
||||
if (expr[i] == close)
|
||||
depth--;
|
||||
i += direction;
|
||||
}
|
||||
if (depth > 0) {
|
||||
@@ -644,7 +647,6 @@ void skipBrackets(const std::string & expr, size_t & pos, const int direction) {
|
||||
} else {
|
||||
pos = i - direction * 2;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// check for multiple instances of <cond> ? <expr1> : <expr2>
|
||||
|
||||
Reference in New Issue
Block a user