From 6a6f3c58b4289544f9aab58036579f7caa0b7cd5 Mon Sep 17 00:00:00 2001 From: bungeman Date: Thu, 21 Apr 2016 10:52:03 -0700 Subject: [PATCH] Fix indentation and casts in SkTArray. Review URL: https://codereview.chromium.org/1902423007 --- include/private/SkTArray.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/private/SkTArray.h b/include/private/SkTArray.h index 8d8f6598db..55d4f86aaa 100644 --- a/include/private/SkTArray.h +++ b/include/private/SkTArray.h @@ -194,11 +194,11 @@ public: */ T* push_back_n(int n) { SkASSERT(n >= 0); - char* newTs = static_cast(this->push_back_raw(n)); + void* newTs = this->push_back_raw(n); for (int i = 0; i < n; ++i) { - new (newTs + i * sizeof(T)) T; + new (static_cast(newTs) + i * sizeof(T)) T; } - return reinterpret_cast(newTs); + return static_cast(newTs); } /** @@ -207,11 +207,11 @@ public: */ T* push_back_n(int n, const T& t) { SkASSERT(n >= 0); - char* newTs = static_cast(this->push_back_raw(n)); + void* newTs = this->push_back_raw(n); for (int i = 0; i < n; ++i) { - new (newTs + i * sizeof(T)) T(t); + new (static_cast(newTs) + i * sizeof(T)) T(t); } - return reinterpret_cast(newTs); + return static_cast(newTs); } /**