baidu / baidu/ICE-BA

Remove an unnecessary null pointer check

Open
#4 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
762
Forks
235
PR merge metrics
No merged PRs in 30d

Description

[An extra null pointer check is not needed in a function](https://isocpp.org/wiki/faq/freestore-mgmt#delete-handles-null "Do I need to check for null before delete p?") like [the destructor for the class “Viewer”](https://github.com/baidu/ICE-BA/blob/c49560c81e47f6b52b18739194fef89330dbdfa0/Backend/Visualization/Viewer.h#L42 "Update candidate").

Contributor guide

No contributing guide indexed for this repository

Research direction

Open Backend/Visualization/Viewer.h at line 42 and inspect the Viewer destructor and its null pointer check. Remove the unnecessary check, then verify that the project still builds; done means the destructor no longer performs that redundant check.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend
Issue type
Refactor
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.