diff options
Diffstat (limited to 'src/3rdparty/angle/src/compiler/translator/Cache.h')
-rw-r--r-- | src/3rdparty/angle/src/compiler/translator/Cache.h | 36 |
1 files changed, 15 insertions, 21 deletions
diff --git a/src/3rdparty/angle/src/compiler/translator/Cache.h b/src/3rdparty/angle/src/compiler/translator/Cache.h index 1d2abb77e1..a182b07f51 100644 --- a/src/3rdparty/angle/src/compiler/translator/Cache.h +++ b/src/3rdparty/angle/src/compiler/translator/Cache.h @@ -16,33 +16,31 @@ #include "compiler/translator/Types.h" #include "compiler/translator/PoolAlloc.h" +namespace sh +{ + class TCache { public: - static void initialize(); static void destroy(); - static const TType *getType(TBasicType basicType, - TPrecision precision) + static const TType *getType(TBasicType basicType, TPrecision precision) { - return getType(basicType, precision, EvqTemporary, - 1, 1); + return getType(basicType, precision, EvqTemporary, 1, 1); } static const TType *getType(TBasicType basicType, - unsigned char primarySize = 1, + unsigned char primarySize = 1, unsigned char secondarySize = 1) { - return getType(basicType, EbpUndefined, EvqGlobal, - primarySize, secondarySize); + return getType(basicType, EbpUndefined, EvqGlobal, primarySize, secondarySize); } static const TType *getType(TBasicType basicType, TQualifier qualifier, - unsigned char primarySize = 1, + unsigned char primarySize = 1, unsigned char secondarySize = 1) { - return getType(basicType, EbpUndefined, qualifier, - primarySize, secondarySize); + return getType(basicType, EbpUndefined, qualifier, primarySize, secondarySize); } static const TType *getType(TBasicType basicType, TPrecision precision, @@ -51,12 +49,9 @@ class TCache unsigned char secondarySize); private: - TCache() - { - } + TCache(); - union TypeKey - { + union TypeKey { TypeKey(TBasicType basicType, TPrecision precision, TQualifier qualifier, @@ -74,12 +69,9 @@ class TCache } components; uint64_t value; - bool operator < (const TypeKey &other) const - { - return value < other.value; - } + bool operator<(const TypeKey &other) const { return value < other.value; } }; - typedef std::map<TypeKey, const TType*> TypeMap; + typedef std::map<TypeKey, const TType *> TypeMap; TypeMap mTypes; TPoolAllocator mAllocator; @@ -87,4 +79,6 @@ class TCache static TCache *sCache; }; +} // namespace sh + #endif // COMPILER_TRANSLATOR_CACHE_H_ |