Add assertion for decreasing the indent

Co-authored-by: Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>
(cherry picked from commit a27651908fc1b5ef73a81e46434a408c5868fa7b)
Change-Id: I2ec78e234c1c6e982f7b05f81d8b8356daf6c274
This commit is contained in:
eldritch horrors 2024-03-08 08:26:03 +01:00
parent 1958152d14
commit 4dabde0485

View file

@ -174,6 +174,7 @@ private:
void decreaseIndent()
{
if (options.prettyPrint()) {
assert(indent.size() >= options.prettyIndent);
indent.resize(indent.size() - options.prettyIndent);
}
}