Cleanup: enable Clang-Tidy `bugprone-parent-virtual-call` rule

I added a single `NOLINT` exception with explanation.

No functional changes.
This commit is contained in:
Sybren A. Stüvel 2020-08-07 17:59:12 +02:00
parent dcff28e1e7
commit ad6e63cb96
2 changed files with 3 additions and 2 deletions

View File

@ -31,7 +31,6 @@ Checks: >
-bugprone-sizeof-expression,
-bugprone-integer-division,
-bugprone-incorrect-roundings,
-bugprone-parent-virtual-call,
-bugprone-copy-constructor-init,
WarningsAsErrors: '*'

View File

@ -27,7 +27,9 @@ namespace Freestyle {
void OrientedLineRep::accept(SceneVisitor &v)
{
Rep::accept(v);
Rep::accept(v); // NOLINT(bugprone-parent-virtual-call), this seems to intentionally *not* call
// the parent class' accept() function, but rather the grandparent's. The
// v.visitLineRep(*this); call below is actually what the parent class would do.
if (!frs_material()) {
v.visitOrientedLineRep(*this);
}