C++: Consistent use of 'this.getIndirection()' in 'toString'.

This commit is contained in:
Mathias Vorreiter Pedersen
2026-05-19 12:16:37 +01:00
parent 25c4d9d09b
commit d93de54397

View File

@@ -136,7 +136,7 @@ private module SourceVariables {
NormalSourceVariable() { this = TNormalSourceVariable(base, ind) }
final override string toString() {
if ind = 0
if this.getIndirection() = 0
then result = "&" + base.toString()
else result = repeatStars(this.getIndirection() - 1) + base.toString()
}
@@ -159,7 +159,7 @@ private module SourceVariables {
}
final override string toString() {
if ind = 0
if this.getIndirection() = 0
then result = "&" + base.toString() + " [before crement]"
else result = repeatStars(this.getIndirection() - 1) + base.toString() + " [before crement]"
}