mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-26 19:53:09 +00:00
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 afterd3e56f0f57removed 21 of them already.2c47fbd66ainitialized 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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user