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

Unified Diff: src/sfnt/SkTypedEnum.h

Issue 2254513002: Remove SkPreprocessorSeq.h and SkTypedEnum.h. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 4 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/sfnt/SkPreprocessorSeq.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/sfnt/SkTypedEnum.h
diff --git a/src/sfnt/SkTypedEnum.h b/src/sfnt/SkTypedEnum.h
deleted file mode 100644
index 19d57acf0a78dded7ecf01b8e62820bac4625721..0000000000000000000000000000000000000000
--- a/src/sfnt/SkTypedEnum.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright 2012 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#ifndef SkTypedEnum_DEFINED
-#define SkTypedEnum_DEFINED
-
-#include "SkPreprocessorSeq.h"
-
-//Compatibility with non-clang compilers.
-#ifndef __has_feature
- #define __has_feature(x) 0
-#endif
-#ifndef __has_extension
- #define __has_extension __has_feature
-#endif
-
-//Detect if typed enums are supported.
-#if defined(_MSC_VER)
- #define SK_TYPED_ENUMS
-
-#elif defined(__clang__) && __has_extension(cxx_strong_enums)
- #define SK_TYPED_ENUMS
-
-// Scoped enums are buggy in GCC 4.4.0 through 4.5.1.
-// See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38064
-// __cplusplus should actually be accurate now.
-// See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=1773
-#elif defined(__GNUC__) && (((__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__ >= 40501) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || __cplusplus >= 201103L)
- #define SK_TYPED_ENUMS
-#endif
-
-//Define what a typed enum looks like.
-#ifdef SK_TYPED_ENUMS
-
- #define SK_TYPED_ENUM_VALUES(data, elem) \
- SK_PAIR_FIRST(elem) = SK_PAIR_SECOND(elem),
-
- #define SK_TYPED_ENUM_IDS(data, elem) \
- elem,
-
- #define SK_TYPED_ENUM_IDS_L(data, elem) \
- elem
-
- #define SK_TYPED_ENUM(enumName, enumType, enumSeq, idSeq) \
- enum enumName : enumType { \
- SK_SEQ_FOREACH(SK_TYPED_ENUM_VALUES, _, enumSeq) \
- } SK_SEQ_FOREACH_L(SK_TYPED_ENUM_IDS, SK_TYPED_ENUM_IDS_L, _, idSeq);
-
-#else
-
- #define SK_TYPED_ENUM_VALUES(enumType, elem) \
- static const enumType SK_PAIR_FIRST(elem) = SK_PAIR_SECOND(elem);
-
- #define SK_TYPED_ENUM_IDS(enumType, elem) \
- enumType elem;
-
- #define SK_TYPED_ENUM(enumName, enumType, enumSeq, idSeq) \
- typedef enumType enumName; \
- SK_SEQ_FOREACH(SK_TYPED_ENUM_VALUES, enumType, enumSeq) \
- SK_SEQ_FOREACH(SK_TYPED_ENUM_IDS, enumType, idSeq)
-
-#endif
-
-#endif
« no previous file with comments | « src/sfnt/SkPreprocessorSeq.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698