CPP lint: Can you enforce use of this for class variables?

408 Views Asked by At

Is there a lint script that will enforce use of this for class variables?

Ex -

class A {
    int var1;

    void func() {
        return var1;
    }
}

should be -

class A {
    int var1;

    void func() {
        return this->var1;
    }
}
0

There are 0 best solutions below