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

Side by Side Diff: ppapi/cpp/logging.h

Issue 8438005: Some description changes and documentation for logging.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 1 month 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/cpp/instance.h ('k') | ppapi/cpp/module_impl.h » ('j') | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_CPP_LOGGING_H_ 5 #ifndef PPAPI_CPP_LOGGING_H_
6 #define PPAPI_CPP_LOGGING_H_ 6 #define PPAPI_CPP_LOGGING_H_
7 7
8 /// @file
9 /// This file defines two macro asserts.
10
8 #include <cassert> 11 #include <cassert>
9 12
13 /// This macro asserts that 'a' evaluates to true. In debug mode, this macro
14 /// will crash the program if the assertion evaluates to false. It (typically)
15 /// has no effect in release mode.
10 #define PP_DCHECK(a) assert(a) 16 #define PP_DCHECK(a) assert(a)
11 17
18 /// This macro asserts false in debug builds. It's used in code paths that you
19 /// don't expect to execute.
20 ///
21 /// <strong>Example:</code>
22 ///
23 /// <code>
24 /// if (!pointer) {
25 /// // Pointer wasn't valid! This shouldn't happen.
26 /// PP_NOTREACHED();
27 /// return;
28 /// }
29 /// // Do stuff to the pointer, since you know it's valid.
30 /// pointer->DoSomething();
31 /// </code>
12 #define PP_NOTREACHED() assert(false) 32 #define PP_NOTREACHED() assert(false)
13 33
14 #endif // PPAPI_CPP_LOGGING_H_ 34 #endif // PPAPI_CPP_LOGGING_H_
OLDNEW
« no previous file with comments | « ppapi/cpp/instance.h ('k') | ppapi/cpp/module_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698