Zero initialize all pointer class and struct members
This prevents the pitfall of UB when checking if they have been assigned something valid by comparing to nullptr.
This commit is contained in:
parent
53317bbe14
commit
f8ab79e68a
258 changed files with 2398 additions and 2421 deletions
|
|
@ -37,7 +37,7 @@
|
|||
class OpenXREditorPlugin : public EditorPlugin {
|
||||
GDCLASS(OpenXREditorPlugin, EditorPlugin);
|
||||
|
||||
OpenXRActionMapEditor *action_map_editor;
|
||||
OpenXRActionMapEditor *action_map_editor = nullptr;
|
||||
|
||||
public:
|
||||
virtual String get_name() const override { return "OpenXRPlugin"; }
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ class OpenXRAPI;
|
|||
|
||||
class OpenXRExtensionWrapper {
|
||||
protected:
|
||||
OpenXRAPI *openxr_api;
|
||||
OpenXRAPI *openxr_api = nullptr;
|
||||
|
||||
// Store extension we require.
|
||||
// If bool pointer is a nullptr this means this extension is mandatory and initialisation will fail if it is not available
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue