Joined
Last Seen
0 Reputation Points
Unknown Quality Score
No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
0 Endorsements
Ranked #54.9K
When having a class: [code=cplusplus] class X { int data_; void f() { //shall I cache var data_? by doing int cached = data_ //and instead of this: if (data_ >= 0 && data_ < 1000 || data_ < 0 && data_ > -1000)//first version { //do something } else … |
|
Is it a good programming practice to not use getters and setters in trivial parts of code? |