gammasoft71 / xtd

Free open-source modern C++17 / C++20 framework to create console, GUI (forms like WinForms) and unit test applications and libraries on Microsoft Windows, Apple macOS and Linux.
https://gammasoft71.github.io/xtd
MIT License
735 stars 57 forks source link

[ENHANCEMENT] Remove unnecessary null pointer checks #214

Closed elfring closed 1 year ago

elfring commented 1 year ago

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

gammasoft71 commented 1 year ago

Thank you for your interest in xtd and for your feedback.

Indeed, there are indeed too many nullptr tests.

How did you find these redundant tests? With a tool or by simply reading the code?

xtd is regularly scanned with cppcheck and this error is not highlighted.

Kind regards

Gammasoft