Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(168)

Unified Diff: src/core/SkTLList.h

Issue 1316123003: Style Change: SkNEW->new; SkDELETE->delete (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-26 (Wednesday) 15:59:00 EDT Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkStream.cpp ('k') | src/core/SkTLS.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkTLList.h
diff --git a/src/core/SkTLList.h b/src/core/SkTLList.h
index 35435298864bde0a1e5b158f16324ffc224b3e9c..3a91efeed5c7e77d4f71fed3ec72e87cd2a0d778 100644
--- a/src/core/SkTLList.h
+++ b/src/core/SkTLList.h
@@ -70,7 +70,7 @@ public:
this->validate();
Node* node = this->createNode();
fList.addToHead(node);
- SkNEW_PLACEMENT_ARGS(node->fObj, T, (t));
+ new (node->fObj) T(t);
this->validate();
return reinterpret_cast<T*>(node->fObj);
}
@@ -79,7 +79,7 @@ public:
this->validate();
Node* node = this->createNode();
fList.addToHead(node);
- SkNEW_PLACEMENT(node->fObj, T);
+ new (node->fObj) T;
this->validate();
return reinterpret_cast<T*>(node->fObj);
}
@@ -88,7 +88,7 @@ public:
this->validate();
Node* node = this->createNode();
fList.addToTail(node);
- SkNEW_PLACEMENT_ARGS(node->fObj, T, (t));
+ new (node->fObj) T(t);
this->validate();
return reinterpret_cast<T*>(node->fObj);
}
@@ -97,7 +97,7 @@ public:
this->validate();
Node* node = this->createNode();
fList.addToTail(node);
- SkNEW_PLACEMENT(node->fObj, T);
+ new (node->fObj) T;
this->validate();
return reinterpret_cast<T*>(node->fObj);
}
@@ -105,13 +105,13 @@ public:
/** Adds a new element to the list before the location indicated by the iterator. If the
iterator refers to a NULL location then the new element is added at the tail */
T* addBefore(const T& t, const Iter& location) {
- return SkNEW_PLACEMENT_ARGS(this->internalAddBefore(location), T, (t));
+ return new (this->internalAddBefore(location)) T(t);
}
/** Adds a new element to the list after the location indicated by the iterator. If the
iterator refers to a NULL location then the new element is added at the head */
T* addAfter(const T& t, const Iter& location) {
- return SkNEW_PLACEMENT_ARGS(this->internalAddAfter(location), T, (t));
+ return new (this->internalAddAfter(location)) T(t);
}
/** Convenience methods for getting an iterator initialized to the head/tail of the list. */
@@ -249,11 +249,11 @@ private:
} else {
Block* block = reinterpret_cast<Block*>(sk_malloc_flags(this->blockSize(), 0));
node = &block->fNodes[0];
- SkNEW_PLACEMENT(node, Node);
+ new (node) Node;
node->fBlock = block;
block->fNodesInUse = 1;
for (int i = 1; i < fAllocCnt; ++i) {
- SkNEW_PLACEMENT(block->fNodes + i, Node);
+ new (block->fNodes + i) Node;
fFreeList.addToHead(block->fNodes + i);
block->fNodes[i].fBlock = block;
}
« no previous file with comments | « src/core/SkStream.cpp ('k') | src/core/SkTLS.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698