Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecessary null pointer checks #19

Open
elfring opened this issue Jan 10, 2023 · 10 comments
Open

Remove unnecessary null pointer checks #19

elfring opened this issue Jan 10, 2023 · 10 comments

Comments

@elfring
Copy link

elfring commented Jan 10, 2023

An extra null pointer check is not needed in functions like the following.

@banterle
Copy link
Member

you are perfectly right. However, not all compilers for all platforms support that.

Did you measure a huge bottleneck from those IFs?

@elfring
Copy link
Author

elfring commented Jan 11, 2023

However, not all compilers for all platforms support that.

Would you like to point any tools out which are not compliant to the C++ standard according to the linked implementation detail?

💭 Would you become interested to use a development tool like “clang-tidy” for corresponding source code adjustments?

@banterle
Copy link
Member

Would you like to point any tools out which are not compliant to the C++ standard according to the linked implementation detail?

Probably old compilers.

Would you become interested to use a development tool like “clang-tidy” for corresponding source code adjustments

This aspect will be considered in the future. Probably when moving to smart pointers.

@elfring
Copy link
Author

elfring commented Jan 11, 2023

Probably old compilers.

  • How far would you like to go back in history?
  • Would you dare to restrict development support on C++ standard compliant tools?

Probably when moving to smart pointers.

💭 I would find it helpful if redundant pointer checks could be deleted before occasionally.

@banterle
Copy link
Member

banterle commented Jan 11, 2023

Would you dare to restrict development support on C++ standard compliant tools?

Not now.

@elfring
Copy link
Author

elfring commented Jan 11, 2023

🔮 Do you need any configuration checks for incompliant tools (by the software build system)?

@banterle
Copy link
Member

No, thank you.

@elfring
Copy link
Author

elfring commented Jan 11, 2023

🔮 In which time range do you plan to work more with smart pointers?

@banterle
Copy link
Member

Why?

@elfring
Copy link
Author

elfring commented Jan 11, 2023

💭 Smart pointers can also help to get rid of redundant pointer checks, can't they?

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

No branches or pull requests

2 participants