MegaGlest / megaglest-source

MegaGlest real-time strategy game engine (cross-platform, 3-d)
http://megaglest.org/
349 stars 89 forks source link

Since the string from strerror should never be modified, use const. #202

Open spth opened 3 years ago

spth commented 3 years ago

This is just a very minor issue.

megaglest contains some calls to strerror where the result is assigned to a char . However, according to the strerror specification, the string returned by strerror should never be changed, so I think it would be better to use const char instead.

Philipp

AndyMender commented 3 years ago

I think it's a good idea to use const and constexpr wherever possible, both as a nod to other developers and a safety net for vars which shouldn't change :).