Index: include/private/SkTemplates.h |
diff --git a/include/private/SkTemplates.h b/include/private/SkTemplates.h |
index 272b5856ad117493be98ee42bcc3b94a5fba4b01..7e2c19f09daa199486462e0410f64a79a58cce2c 100644 |
--- a/include/private/SkTemplates.h |
+++ b/include/private/SkTemplates.h |
@@ -434,6 +434,12 @@ T* SkInPlaceNewCheck(void* storage, size_t size, const A1& a1, const A2& a2, con |
return (sizeof(T) <= size) ? new (storage) T(a1, a2, a3) : new T(a1, a2, a3); |
} |
+template <typename T, typename A1, typename A2, typename A3, typename A4> |
+T* SkInPlaceNewCheck(void* storage, size_t size, |
+ const A1& a1, const A2& a2, const A3& a3, const A4& a4) { |
+ return (sizeof(T) <= size) ? new (storage) T(a1, a2, a3, a4) : new T(a1, a2, a3, a4); |
+} |
+ |
/** |
* Reserves memory that is aligned on double and pointer boundaries. |
* Hopefully this is sufficient for all practical purposes. |