Hi,
I am wondering which one of these is better to use in my code:
They do the same thing. So: Is it totally up to me, or does each of these methods have its pros and cons?Code://this one: void handleMouseClick(const int X, const int Y) { if(SelectedObject==NULL) return; SelectedObject->Move(X, Y); SelectedObject->Update(); //... } //or this one: void handleMouseClick(const int X, const int Y) { if(SelectedObject!=NULL) { SelectedObject->Move(X, Y); SelectedObject->Update(); //... } }
Thanks.