aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkTLList.h
diff options
context:
space:
mode:
authorGravatar halcanary <halcanary@google.com>2015-08-26 13:07:48 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-08-26 13:07:49 -0700
commit385fe4d4b62d7d1dd76116dd570df3290a2f487b (patch)
tree53d982ff238828331e86acd44071a44162a8688c /src/core/SkTLList.h
parent5015176adf046ef906a2313b6e6b64b72cc84898 (diff)
Style Change: SkNEW->new; SkDELETE->delete
Diffstat (limited to 'src/core/SkTLList.h')
-rw-r--r--src/core/SkTLList.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/core/SkTLList.h b/src/core/SkTLList.h
index 3543529886..3a91efeed5 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;
}