Skip to content

Instantly share code, notes, and snippets.

@djg
Created February 14, 2014 06:34
Show Gist options
  • Select an option

  • Save djg/8996684 to your computer and use it in GitHub Desktop.

Select an option

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