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

Unified Diff: src/core/SkError.cpp

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/SkDraw.cpp ('k') | src/core/SkFilterShader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkError.cpp
diff --git a/src/core/SkError.cpp b/src/core/SkError.cpp
index 9e8ff2ddef01ff3fda1f5340f7a7e0f42713a796..23db8ac1e4e249ed8fd529477bda9e679ed10fdf 100644
--- a/src/core/SkError.cpp
+++ b/src/core/SkError.cpp
@@ -15,43 +15,31 @@
#include <stdarg.h>
namespace {
- void *CreateThreadError() {
- return SkNEW_ARGS(SkError, (kNoError_SkError));
- }
- void DeleteThreadError(void* v) {
- SkDELETE(reinterpret_cast<SkError*>(v));
- }
+void *CreateThreadError() { return new SkError(kNoError_SkError); }
+void DeleteThreadError(void *v) { delete reinterpret_cast<SkError *>(v); }
#define THREAD_ERROR \
(*reinterpret_cast<SkError*>(SkTLS::Get(CreateThreadError, DeleteThreadError)))
void *CreateThreadErrorCallback() {
- return SkNEW_ARGS(SkErrorCallbackFunction, (SkErrorInternals::DefaultErrorCallback));
+ return new SkErrorCallbackFunction(SkErrorInternals::DefaultErrorCallback);
}
void DeleteThreadErrorCallback(void* v) {
- SkDELETE(reinterpret_cast<SkErrorCallbackFunction *>(v));
+ delete reinterpret_cast<SkErrorCallbackFunction *>(v);
}
#define THREAD_ERROR_CALLBACK \
*(reinterpret_cast<SkErrorCallbackFunction *>(SkTLS::Get(CreateThreadErrorCallback, \
DeleteThreadErrorCallback)))
- void *CreateThreadErrorContext() {
- return SkNEW_ARGS(void **, (NULL));
- }
- void DeleteThreadErrorContext(void* v) {
- SkDELETE(reinterpret_cast<void **>(v));
- }
+ void *CreateThreadErrorContext() { return new void **(NULL); }
+ void DeleteThreadErrorContext(void *v) { delete reinterpret_cast<void **>(v); }
#define THREAD_ERROR_CONTEXT \
(*reinterpret_cast<void **>(SkTLS::Get(CreateThreadErrorContext, DeleteThreadErrorContext)))
#define ERROR_STRING_LENGTH 2048
- void *CreateThreadErrorString() {
- return SkNEW_ARRAY(char, (ERROR_STRING_LENGTH));
- }
- void DeleteThreadErrorString(void* v) {
- SkDELETE_ARRAY(reinterpret_cast<char *>(v));
- }
+ void *CreateThreadErrorString() { return new char[(ERROR_STRING_LENGTH)]; }
+ void DeleteThreadErrorString(void *v) { delete[] reinterpret_cast<char *>(v); }
#define THREAD_ERROR_STRING \
(reinterpret_cast<char *>(SkTLS::Get(CreateThreadErrorString, DeleteThreadErrorString)))
}
« no previous file with comments | « src/core/SkDraw.cpp ('k') | src/core/SkFilterShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698