Skip to content

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

Open
grische wants to merge 1 commit intoCGRU:masterfrom
grische:use-nullptr-in-msg
Open

afanasy: use nullptr instead of NULL in af::Msg#628
grische wants to merge 1 commit intoCGRU:masterfrom
grische:use-nullptr-in-msg

Conversation

@grische
Copy link
Contributor

@grische grische commented Jun 12, 2025

No description provided.

@timurhai
Copy link
Member

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

@grische
Copy link
Contributor Author

grische commented Jun 18, 2025

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.

@timurhai
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants