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

Unified Diff: include/private/SkFunction.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 | « include/gpu/gl/angle/SkANGLEGLContext.h ('k') | include/private/SkTHash.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/private/SkFunction.h
diff --git a/include/private/SkFunction.h b/include/private/SkFunction.h
index 024ba7c9b2b15bd899587801a6723b9b07b189ac..1b9903006ee7f61400c6d35a347bde6ee32aaa41 100644
--- a/include/private/SkFunction.h
+++ b/include/private/SkFunction.h
@@ -21,9 +21,10 @@ public:
SkFunction() {}
template <typename Fn>
- SkFunction(const Fn& fn) : fFunction(SkNEW_ARGS(LambdaImpl<Fn>, (fn))) {}
+ SkFunction(const Fn& fn)
+ : fFunction(new LambdaImpl<Fn>(fn)) {}
- SkFunction(R (*fn)(Args...)) : fFunction(SkNEW_ARGS(FnPtrImpl, (fn))) {}
+ SkFunction(R (*fn)(Args...)) : fFunction(new FnPtrImpl(fn)) {}
SkFunction(const SkFunction& other) { *this = other; }
SkFunction& operator=(const SkFunction& other) {
@@ -51,7 +52,8 @@ private:
LambdaImpl(const Fn& fn) : fFn(fn) {}
R call(Args... args) const override { return fFn(skstd::forward<Args>(args)...); }
- Interface* clone() const override { return SkNEW_ARGS(LambdaImpl<Fn>, (fFn)); }
+ Interface* clone() const override { return new LambdaImpl<Fn>(fFn); }
+
private:
Fn fFn;
};
@@ -61,7 +63,8 @@ private:
FnPtrImpl(R (*fn)(Args...)) : fFn(fn) {}
R call(Args... args) const override { return fFn(skstd::forward<Args>(args)...); }
- Interface* clone() const override { return SkNEW_ARGS(FnPtrImpl, (fFn)); }
+ Interface* clone() const override { return new FnPtrImpl(fFn); }
+
private:
R (*fFn)(Args...);
};
« no previous file with comments | « include/gpu/gl/angle/SkANGLEGLContext.h ('k') | include/private/SkTHash.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698