zenustech / zeno

ZEn NOde system - a simulation & rendering engine in nodes
http://zenustech.com
Mozilla Public License 2.0
1.2k stars 142 forks source link

Remove unnecessary null pointer checks #788

Open elfring opened 1 year ago

elfring commented 1 year ago

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

zhouhang95 commented 1 year ago

@legobadman

elfring commented 1 year ago

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

archibate commented 1 year ago

Yes, that's why I always use smart pointers instead of raw pointers, Qt dislike smart pointers however...

无法顺畅的大口呼吸,是活着的最好证明

---Original--- From: "Markus @.> Date: Wed, Dec 14, 2022 21:43 PM To: @.>; Cc: @.***>; Subject: [zenustech/zeno] Remove unnecessary null pointer checks (Issue #788)

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

NodeScene::resetPreset

ResizableImageItem::resetImage

ZenoMainWindow::initDocks

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

legobadman commented 1 year ago

@legobadman 有些代码没用到的代码,你可以直接删掉