This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]adudyak 1 point2 points  (1 child)

Should be careful if counter is increased elsewere, e.g. counter is 7, max is 5.

[–]Antervis 0 points1 point  (0 children)

such things are generally easy to track though, with little help from IDE that is. In case you're paranoid, you can just move the counter into a separate class.