Fix indentation and casts in SkTArray.

Review URL: https://codereview.chromium.org/1902423007
This commit is contained in:
bungeman 2016-04-21 10:52:03 -07:00 committed by Commit bot
parent eb85fd746d
commit 6a6f3c58b4

View File

@ -194,11 +194,11 @@ public:
*/
T* push_back_n(int n) {
SkASSERT(n >= 0);
char* newTs = static_cast<char*>(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<char*>(newTs) + i * sizeof(T)) T;
}
return reinterpret_cast<T*>(newTs);
return static_cast<T*>(newTs);
}
/**
@ -207,11 +207,11 @@ public:
*/
T* push_back_n(int n, const T& t) {
SkASSERT(n >= 0);
char* newTs = static_cast<char*>(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<char*>(newTs) + i * sizeof(T)) T(t);
}
return reinterpret_cast<T*>(newTs);
return static_cast<T*>(newTs);
}
/**