Skip to content

Instantly share code, notes, and snippets.

@djg
Created February 14, 2014 06:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save djg/8996684 to your computer and use it in GitHub Desktop.
Save djg/8996684 to your computer and use it in GitHub Desktop.
if (texture() && texture()->SomeMethod()) {
texture()->SomeOtherMethod()->FooBar();
}
vs
Texture* tex = texture();
if (tex && tex->SomeMethod()) {
tex->SomeOtherMethod()->FooBar();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment