megaglest-source icon indicating copy to clipboard operation
megaglest-source copied to clipboard

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

Open spth opened this issue 5 years ago • 1 comments

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

spth avatar Oct 14 '20 08:10 spth

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 :).

AndyMender avatar Dec 28 '20 10:12 AndyMender