Use CGUI& instead of CGUI* so that the 50+ users stop wondering whether or not that is null and can't even be mistaken to add redundant null checks preemptively.

Remove the remaining of such checks after d3e56f0f57 removed 21 of them
already.
2c47fbd66a initialized the pointer at construction time rather than at
random conditional events later.

Differential Revision: https://code.wildfiregames.com/D2205
Comments By: Vladislav, wraitii
Tested on: gcc 9.1.0, clang 8.0.1

This was SVN commit r22741.
This commit is contained in:
elexis
2019-08-21 10:12:33 +00:00
parent 632f687ab6
commit e1014aad3b
58 changed files with 168 additions and 185 deletions
@@ -199,7 +199,7 @@ bool JSI_IGUIObject::focus(JSContext* cx, uint argc, JS::Value* vp)
if (!e)
return false;
e->GetGUI()->SetFocusedObject(e);
e->GetGUI().SetFocusedObject(e);
args.rval().setUndefined();
return true;
}
@@ -212,7 +212,7 @@ bool JSI_IGUIObject::blur(JSContext* cx, uint argc, JS::Value* vp)
if (!e)
return false;
e->GetGUI()->SetFocusedObject(NULL);
e->GetGUI().SetFocusedObject(nullptr);
args.rval().setUndefined();
return true;
}