Skip to content

Commit

Permalink
refactor: make StripState methods inline
Browse files Browse the repository at this point in the history
  • Loading branch information
thecaralice committed Apr 2, 2024
1 parent bf21828 commit d656349
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/libexpr/parser-state.hh
Original file line number Diff line number Diff line change
Expand Up @@ -178,18 +178,18 @@ struct StripState {
bool start = true;
size_t min = -1;
size_t cur = 0;
bool indent(char c) {
inline bool indent(char c) {
if (!start) return true;
indentChar = indentChar.value_or(IndentChar(c));
bool ok = (indentChar == c);
cur += ok;
return ok;
}
void stop() {
inline void stop() {
start = false;
min = std::min(min, cur);
}
void reset() {
inline void reset() {
start = true;
cur = 0;
}
Expand Down

0 comments on commit d656349

Please sign in to comment.