Title: [187546] trunk/Source/WebCore
- Revision
- 187546
- Author
- mcatanz...@igalia.com
- Date
- 2015-07-29 07:30:50 -0700 (Wed, 29 Jul 2015)
Log Message
Clean up RefPtrCairo.cpp
https://bugs.webkit.org/show_bug.cgi?id=147384
Reviewed by Martin Robinson.
Tests for null/non-null should all be done without equality comparisons.
* platform/graphics/cairo/RefPtrCairo.cpp:
(WTF::refIfNotNull):
(WTF::derefIfNotNull):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (187545 => 187546)
--- trunk/Source/WebCore/ChangeLog 2015-07-29 12:35:31 UTC (rev 187545)
+++ trunk/Source/WebCore/ChangeLog 2015-07-29 14:30:50 UTC (rev 187546)
@@ -1,3 +1,16 @@
+2015-07-29 Michael Catanzaro <mcatanz...@igalia.com>
+
+ Clean up RefPtrCairo.cpp
+ https://bugs.webkit.org/show_bug.cgi?id=147384
+
+ Reviewed by Martin Robinson.
+
+ Tests for null/non-null should all be done without equality comparisons.
+
+ * platform/graphics/cairo/RefPtrCairo.cpp:
+ (WTF::refIfNotNull):
+ (WTF::derefIfNotNull):
+
2015-07-29 Dean Jackson <d...@apple.com>
Remove dispatch_apply_f and instead use vImage more directly
Modified: trunk/Source/WebCore/platform/graphics/cairo/RefPtrCairo.cpp (187545 => 187546)
--- trunk/Source/WebCore/platform/graphics/cairo/RefPtrCairo.cpp 2015-07-29 12:35:31 UTC (rev 187545)
+++ trunk/Source/WebCore/platform/graphics/cairo/RefPtrCairo.cpp 2015-07-29 14:30:50 UTC (rev 187546)
@@ -32,98 +32,98 @@
template<> void refIfNotNull(cairo_t* ptr)
{
- if (LIKELY(ptr != 0))
+ if (LIKELY(ptr))
cairo_reference(ptr);
}
template<> void derefIfNotNull(cairo_t* ptr)
{
- if (LIKELY(ptr != 0))
+ if (LIKELY(ptr))
cairo_destroy(ptr);
}
template<> void refIfNotNull(cairo_surface_t* ptr)
{
- if (LIKELY(ptr != 0))
+ if (LIKELY(ptr))
cairo_surface_reference(ptr);
}
template<> void derefIfNotNull(cairo_surface_t* ptr)
{
- if (LIKELY(ptr != 0))
+ if (LIKELY(ptr))
cairo_surface_destroy(ptr);
}
template<> void refIfNotNull(cairo_font_face_t* ptr)
{
- if (LIKELY(ptr != 0))
+ if (LIKELY(ptr))
cairo_font_face_reference(ptr);
}
template<> void derefIfNotNull(cairo_font_face_t* ptr)
{
- if (LIKELY(ptr != 0))
+ if (LIKELY(ptr))
cairo_font_face_destroy(ptr);
}
template<> void refIfNotNull(cairo_scaled_font_t* ptr)
{
- if (LIKELY(ptr != 0))
+ if (LIKELY(ptr))
cairo_scaled_font_reference(ptr);
}
template<> void derefIfNotNull(cairo_scaled_font_t* ptr)
{
- if (LIKELY(ptr != 0))
+ if (LIKELY(ptr))
cairo_scaled_font_destroy(ptr);
}
template<> void refIfNotNull(cairo_pattern_t* ptr)
{
- if (LIKELY(ptr != 0))
+ if (LIKELY(ptr))
cairo_pattern_reference(ptr);
}
template<> void derefIfNotNull(cairo_pattern_t* ptr)
{
- if (LIKELY(ptr != 0))
+ if (LIKELY(ptr))
cairo_pattern_destroy(ptr);
}
template<> void refIfNotNull(cairo_region_t* ptr)
{
- if (LIKELY(ptr != 0))
+ if (LIKELY(ptr))
cairo_region_reference(ptr);
}
template<> void derefIfNotNull(cairo_region_t* ptr)
{
- if (LIKELY(ptr != 0))
+ if (LIKELY(ptr))
cairo_region_destroy(ptr);
}
#if USE(FREETYPE)
template<> void refIfNotNull(FcPattern* ptr)
{
- if (LIKELY(ptr != 0))
+ if (LIKELY(ptr))
FcPatternReference(ptr);
}
template<> void derefIfNotNull(FcPattern* ptr)
{
- if (LIKELY(ptr != 0))
+ if (LIKELY(ptr))
FcPatternDestroy(ptr);
}
template<> void refIfNotNull(FcConfig* ptr)
{
- if (LIKELY(ptr != nullptr))
+ if (LIKELY(ptr))
FcConfigReference(ptr);
}
template<> void derefIfNotNull(FcConfig* ptr)
{
- if (LIKELY(ptr != nullptr))
+ if (LIKELY(ptr))
FcConfigDestroy(ptr);
}
#endif
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes