Add #ifndef guards to types in cef_build.h (issue #1336).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1808 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
parent
2d12b430d3
commit
c06d0cd2d8
|
@ -136,6 +136,7 @@
|
||||||
// method in the parent class.
|
// method in the parent class.
|
||||||
// Use like:
|
// Use like:
|
||||||
// virtual void foo() OVERRIDE;
|
// virtual void foo() OVERRIDE;
|
||||||
|
#ifndef OVERRIDE
|
||||||
#if defined(__clang__) || defined(COMPILER_MSVC)
|
#if defined(__clang__) || defined(COMPILER_MSVC)
|
||||||
#define OVERRIDE override
|
#define OVERRIDE override
|
||||||
#elif defined(COMPILER_GCC) && __cplusplus >= 201103 && \
|
#elif defined(COMPILER_GCC) && __cplusplus >= 201103 && \
|
||||||
|
@ -145,27 +146,32 @@
|
||||||
#else
|
#else
|
||||||
#define OVERRIDE
|
#define OVERRIDE
|
||||||
#endif
|
#endif
|
||||||
|
#endif // OVERRIDE
|
||||||
|
|
||||||
// Annotate a function indicating the caller must examine the return value.
|
// Annotate a function indicating the caller must examine the return value.
|
||||||
// Use like:
|
// Use like:
|
||||||
// int foo() WARN_UNUSED_RESULT;
|
// int foo() WARN_UNUSED_RESULT;
|
||||||
// To explicitly ignore a result, see |ignore_result()| in <base/basictypes.h>.
|
// To explicitly ignore a result, see |ignore_result()| in <base/basictypes.h>.
|
||||||
|
#ifndef WARN_UNUSED_RESULT
|
||||||
#if defined(COMPILER_GCC)
|
#if defined(COMPILER_GCC)
|
||||||
#define WARN_UNUSED_RESULT __attribute__((warn_unused_result))
|
#define WARN_UNUSED_RESULT __attribute__((warn_unused_result))
|
||||||
#else
|
#else
|
||||||
#define WARN_UNUSED_RESULT
|
#define WARN_UNUSED_RESULT
|
||||||
#endif
|
#endif
|
||||||
|
#endif // WARN_UNUSED_RESULT
|
||||||
|
|
||||||
// Annotate a variable indicating it's ok if the variable is not used.
|
// Annotate a variable indicating it's ok if the variable is not used.
|
||||||
// (Typically used to silence a compiler warning when the assignment
|
// (Typically used to silence a compiler warning when the assignment
|
||||||
// is important for some other reason.)
|
// is important for some other reason.)
|
||||||
// Use like:
|
// Use like:
|
||||||
// int x ALLOW_UNUSED = ...;
|
// int x ALLOW_UNUSED = ...;
|
||||||
|
#ifndef ALLOW_UNUSED
|
||||||
#if defined(COMPILER_GCC)
|
#if defined(COMPILER_GCC)
|
||||||
#define ALLOW_UNUSED __attribute__((unused))
|
#define ALLOW_UNUSED __attribute__((unused))
|
||||||
#else
|
#else
|
||||||
#define ALLOW_UNUSED
|
#define ALLOW_UNUSED
|
||||||
#endif
|
#endif
|
||||||
|
#endif // ALLOW_UNUSED
|
||||||
|
|
||||||
#endif // !BUILDING_CEF_SHARED
|
#endif // !BUILDING_CEF_SHARED
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue