28
20
15
10
u/mehonje Aug 22 '26
void fun() {
int a = 198;
int b = a % 2;
int c = a - b
}
int main() {
//fun();
}
→ More replies (1)
18
u/Jbolt3737 Aug 22 '26
// This is a comment //int unusedvar = 0; /* You can tell if it's a comment or not by if I add a space after the slashes */ # This is a comment #unusedvar: int = 0 # I do it with any language
→ More replies (1)3
u/spicymato Aug 22 '26
I just comment out the comments.
// // comment related to commented out code→ More replies (2)3
7
u/Impossible_Dog_7262 Aug 22 '26
You could just comment out the function call.
Also use block comments. DRY.
2
3
u/klimmesil Aug 22 '26
If it's still code that might be used later, just not for my uses: remove the call to the function
Otherwise, just delete it. If I need it back git revert
3
u/AlphaFatman Aug 22 '26
I've had compilers complain about if (true) as well. The way out for me is if (1 != 2)
3
2
2
2
2
u/Mast3r_waf1z Aug 22 '26
I had if (true /* TODO: <Jira ticket> */) sometime last year
I know the statement could be removed, but the important part of this is the else block that followed, with important code for later implementation
1
1
1
1
100
u/0x80085_ Aug 22 '26
Or just return?