ZigRazor/CXXGraph

"Const" code review

AlfredCP opened this issue · 2 comments

Following the "const whenever is possible" principle, I would suggest to add this restriction to our code in places where we want our structures not to change and force them to stay untouchable.

Already commented in @ZigRazor PR

sidml commented

@AlfredCP Did your previous PR resolve this or does this need more work ?

No, I did not do it. With this task I was refering to:

  • make functions "const" if they can/should.
  • Pass functions arguments as const if they can/should
  • Make critical objects const if they should not change throught a function even if they are local.

So in the end, this task would be to go through all code and check for this elements to make the code more robust.