OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef PPAPI_CPP_COMMON_H_ |
| 6 #define PPAPI_CPP_COMMON_H_ |
| 7 |
| 8 /** |
| 9 * @file |
| 10 * Defines the API ... |
| 11 * |
| 12 * @addtogroup CPP |
| 13 * @{ |
| 14 */ |
| 15 |
| 16 #include "ppapi/c/pp_bool.h" |
| 17 |
| 18 namespace pp { |
| 19 |
| 20 /** Convert a C++ bool to the appropriate PP_Bool value. */ |
| 21 inline PP_Bool BoolToPPBool(bool value) { |
| 22 return value ? PP_TRUE : PP_FALSE; |
| 23 } |
| 24 |
| 25 /** Convert a PP_Bool to a C++ bool value. */ |
| 26 inline bool PPBoolToBool(PP_Bool value) { |
| 27 return !!value; |
| 28 } |
| 29 |
| 30 } // namespace pp |
| 31 |
| 32 /** |
| 33 * @} |
| 34 * End addtogroup CPP |
| 35 */ |
| 36 |
| 37 #endif // PPAPI_CPP_COMMON_H_ |
| 38 |
OLD | NEW |