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

Side by Side Diff: src/pdf/SkScopeExit.h

Issue 2330503002: work in progress (Closed)
Patch Set: Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « src/pdf/SkPDFResourceDict.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2016 Google Inc. 2 * Copyright 2016 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkScopeExit_DEFINED 8 #ifndef SkScopeExit_DEFINED
9 #define SkScopeExit_DEFINED 9 #define SkScopeExit_DEFINED
10 10
(...skipping 29 matching lines...) Expand all
40 40
41 template <typename Fn> 41 template <typename Fn>
42 inline SkScopeExit<Fn> SkMakeScopeExit(Fn&& fn) { 42 inline SkScopeExit<Fn> SkMakeScopeExit(Fn&& fn) {
43 return {std::move(fn)}; 43 return {std::move(fn)};
44 } 44 }
45 45
46 #define SK_AT_SCOPE_EXIT(stmt) \ 46 #define SK_AT_SCOPE_EXIT(stmt) \
47 SK_UNUSED auto&& SK_MACRO_APPEND_LINE(at_scope_exit_) = \ 47 SK_UNUSED auto&& SK_MACRO_APPEND_LINE(at_scope_exit_) = \
48 SkMakeScopeExit([&]() { stmt; }); 48 SkMakeScopeExit([&]() { stmt; });
49 49
50 #define SK_AT_SCOPE_EXIT2(...) \
51 SK_UNUSED auto&& SK_MACRO_APPEND_LINE(at_scope_exit_) = \
52 SkMakeScopeExit([&]() { __VA_ARGS__ });
53
50 #endif // SkScopeExit_DEFINED 54 #endif // SkScopeExit_DEFINED
OLDNEW
« no previous file with comments | « src/pdf/SkPDFResourceDict.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698