cgru icon indicating copy to clipboard operation
cgru copied to clipboard

afanasy: use nullptr instead of NULL in af::Msg

Open grische opened this issue 7 months ago • 3 comments

grische avatar Jun 12 '25 14:06 grische

Hello! What it the difference? Both keywords defined as 0 (equal to zero number).

timurhai avatar Jun 18 '25 11:06 timurhai

nullptr avoids using implicit casts in the process and generally speaking highly recommended over using the NULL macro in C++.

That's a pretty nice article explaining the differences: https://dzone.com/articles/what-exactly-nullptr-is-in-c

The PR is just some code cleanup.

grische avatar Jun 18 '25 12:06 grische

There are lots of thing that can be better. Language standards are always changing. There is no need to rewrite mature code, that is definitely working, for new standards. New code standards + new formatting standards can cause rewrite most lines of code. We (I) should pay attention for new rules when we write a new code. We should not rewrite code that works. ps Better to spend time to catch a bug. There is no need just to read code and try to make it more modern. pps Bugs catching - is a more important and useful.

timurhai avatar Jun 18 '25 13:06 timurhai