Daemon icon indicating copy to clipboard operation
Daemon copied to clipboard

erroneous const-ness for some functions

Open ghost opened this issue 3 years ago • 0 comments

While migrating my codebase toward glm, I identified 3 functions that have wrong const-ness in daemon's public API:

  • trap_S_StartSound
  • CM_BoxTrace
  • trap_R_LightForPoint

This is trivial to fix (add the const keyword for un-modified arguments) or work around (use const_cast), of course, but I'm pretty sure there are other ones, so would probably be a good idea to take some time to hunt for more and fix all of those in a single commit. Changing this will break nothing in API or ABI and can benefit games using daemon a lot, as it allows to improve const-ness, making code easier to maintain.

ghost avatar Jan 26 '23 19:01 ghost