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

Side by Side Diff: ppapi/tests/test_utils.h

Issue 8885012: Replace PP_ALLOW_THIS_IN_INITIALIZER_LIST macro (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: revise Created 9 years 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 | Annotate | Revision Log
« no previous file with comments | « ppapi/tests/test_transport.cc ('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 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef PPAPI_TESTS_TEST_UTILS_H_ 5 #ifndef PPAPI_TESTS_TEST_UTILS_H_
6 #define PPAPI_TESTS_TEST_UTILS_H_ 6 #define PPAPI_TESTS_TEST_UTILS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "ppapi/c/dev/ppb_testing_dev.h" 10 #include "ppapi/c/dev/ppb_testing_dev.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 #else 72 #else
73 #error Please add support for your platform in ppapi/c/pp_macros.h. 73 #error Please add support for your platform in ppapi/c/pp_macros.h.
74 #endif 74 #endif
75 75
76 /* These are used to determine POSIX-like implementations vs Windows. */ 76 /* These are used to determine POSIX-like implementations vs Windows. */
77 #if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || \ 77 #if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || \
78 defined(__OpenBSD__) || defined(__sun) || defined(__native_client__) 78 defined(__OpenBSD__) || defined(__sun) || defined(__native_client__)
79 #define PPAPI_POSIX 1 79 #define PPAPI_POSIX 1
80 #endif 80 #endif
81 81
82 // This is roughly copied from base/compiler_specific.h, and makes it possible
83 // to pass 'this' in a constructor initializer list, when you really mean it.
84 //
85 // Example usage:
86 // Foo::Foo(MyInstance* instance)
87 // : ALLOW_THIS_IN_INITIALIZER_LIST(callback_factory_(this)) {}
88 #if defined(COMPILER_MSVC)
89 #define PP_ALLOW_THIS_IN_INITIALIZER_LIST(code) \
90 __pragma(warning(push)) \
91 __pragma(warning(disable:4355)) \
92 code \
93 __pragma(warning(pop))
94 #else
95 #define PP_ALLOW_THIS_IN_INITIALIZER_LIST(code) code
96 #endif
97
98 #endif // PPAPI_TESTS_TEST_UTILS_H_ 82 #endif // PPAPI_TESTS_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « ppapi/tests/test_transport.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698