Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
This might be some kind of a feature flag.
Of course, it would be better to define a bool constant and pass it into the if statement. -
That is called a highlighted comment. It isn't executed like a comment but you get the full syntax highlighting.
Normally, there is an actual comment about reevaluating something in the future and then enabling or deleting that block preceding it. -
@Lensflare @Oktokolo fair! But this was code that did DMA transfers to the device in the wrong order (i.e. absolutely useless), so definitely not worth keeping. I guess they were just testing this, this code definitely looks rough and unfinished.
-
@RememberMe
Maybe, it was for the previous device and it wasn't clear whether the new hardware is final or reverts back to old behaviour in the next version.
Might also just be a case of not knowing, what a CVS is used for (classic fear of losing code)... -
Commenting out isn't the correct solution here, delete key is. You can always find it in history.
Found in the PCIe driver code for something I have to work with:
if (false) {
// 200 lines of unnecessary code
}
You ever heard of, you know, comments?
rant