Removed bool conversion operators.
https://codereview.appspot.com/6855113/diff/1/src/ports/SkFontHost_mac_corete...
File src/ports/SkFontHost_mac_coretext.cpp (right):
https://codereview.appspot.com/6855113/diff/1/src/ports/SkFontHost_mac_corete...
src/ports/SkFontHost_mac_coretext.cpp:62: bool operator !() const { return NULL
== fCFRef; }
On 2012/12/03 13:01:11, caryclark1 wrote:
> This is worrisome and looks prone to abuse, because accidental casts to bool
are
> so easy to do. I would prefer to see:
> operator !=
> operator ==
> and
> if (NULL != foo)
> etc. instead. This is the pattern that gpu code uses.
>
Yes. It appears that Chromium's ScopedCFTypeRef agrees as well. Done.
Issue 6855113: Templatize AutoCFRelease and use it.
(Closed)
Created 12 years ago by bungeman
Modified 12 years ago
Reviewers: caryclark1
Base URL: http://skia.googlecode.com/svn/trunk/
Comments: 2