diff options
author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-01-25 19:05:12 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-01-25 19:05:12 +0000 |
commit | c921843d85b4e79857103cdb614f76f123efa7f5 (patch) | |
tree | f4cc6f4a3187f3a26a6064afa6437a57070ec417 /gpu/include | |
parent | 759b0363dad5c36d5366fd167b9224a46b565f53 (diff) |
fixes for some warnings:
- #if of something that was not defined
- explicit constructor call for baseclass in copy-constructor of subclass
http://code.google.com/p/skia/issues/detail?id=112
git-svn-id: http://skia.googlecode.com/svn/trunk@727 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gpu/include')
-rw-r--r-- | gpu/include/GrConfig.h | 27 | ||||
-rw-r--r-- | gpu/include/GrPath.h | 2 |
2 files changed, 22 insertions, 7 deletions
diff --git a/gpu/include/GrConfig.h b/gpu/include/GrConfig.h index 9c18f60ef6..e933b031a3 100644 --- a/gpu/include/GrConfig.h +++ b/gpu/include/GrConfig.h @@ -68,7 +68,7 @@ #undef GR_IOS_BUILD #define GR_IOS_BUILD 1 // #error "IOS" - #elif ANDROID_NDK || defined(ANDROID) + #elif (defined(ANDROID_NDK) && ANDROID_NDK) || defined(ANDROID) #undef GR_ANDROID_BUILD #define GR_ANDROID_BUILD 1 // #error "ANDROID" @@ -87,15 +87,28 @@ #endif #endif -#if !defined(GR_DEBUG) && !defined(GR_RELEASE) - #ifdef NDEBUG - #define GR_DEBUG 0 +// we need both GR_DEBUG and GR_RELEASE to be defined as 0 or 1 +// +#ifndef GR_DEBUG + #ifdef GR_RELEASE + #define GR_DEBUG !GR_RELEASE #else - #define GR_DEBUG 1 + #ifdef NDEBUG + #define GR_DEBUG 0 + #else + #define GR_DEBUG 1 + #endif #endif +#endif + +#ifndef GR_RELEASE #define GR_RELEASE !GR_DEBUG #endif +#if GR_DEBUG == GR_RELEASE + #error "GR_DEBUG and GR_RELEASE must not be the same +#endif + /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// @@ -159,7 +172,7 @@ extern void GrPrintf(const char format[], ...); * particular compiler. * To insert compiler warnings use "#pragma message GR_WARN(<string>)" */ -#if _MSC_VER +#if defined(_MSC_VER) && _MSC_VER #define GR_WARN(MSG) (GR_FILE_AND_LINE_STR "WARNING: " MSG) #else//__GNUC__ - may need other defines for different compilers #define GR_WARN(MSG) ("WARNING: " MSG) @@ -239,7 +252,7 @@ extern void GrPrintf(const char format[], ...); // VS 2010 and GCC compiled with c++0x or gnu++0x support the new // static_assert. #if !defined(GR_STATIC_ASSERT) - #if (_MSC_VER >= 1600) || __GXX_EXPERIMENTAL_CXX0X__ + #if (defined(_MSC_VER) && _MSC_VER >= 1600) || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__) #define GR_STATIC_ASSERT(CONDITION) static_assert(CONDITION, "bug") #else template <bool> class GR_STATIC_ASSERT_FAILURE; diff --git a/gpu/include/GrPath.h b/gpu/include/GrPath.h index a9b75665c3..cf7b97f2d8 100644 --- a/gpu/include/GrPath.h +++ b/gpu/include/GrPath.h @@ -78,6 +78,8 @@ private: } friend class Iter; + + typedef GrPathSink INHERITED; }; #endif |