diff options
Diffstat (limited to 'src/3rdparty/webkit/WebCore/loader/CachedResourceHandle.h')
-rw-r--r-- | src/3rdparty/webkit/WebCore/loader/CachedResourceHandle.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/3rdparty/webkit/WebCore/loader/CachedResourceHandle.h b/src/3rdparty/webkit/WebCore/loader/CachedResourceHandle.h index 13c03c7..feb59b9 100644 --- a/src/3rdparty/webkit/WebCore/loader/CachedResourceHandle.h +++ b/src/3rdparty/webkit/WebCore/loader/CachedResourceHandle.h @@ -38,7 +38,8 @@ namespace WebCore { bool operator!() const { return !m_resource; } // This conversion operator allows implicit conversion to bool but not to other integer types. - typedef CachedResource* CachedResourceHandleBase::*UnspecifiedBoolType; + // Parenthesis is needed for winscw compiler to resolve class qualifier in this case. + typedef CachedResource* (CachedResourceHandleBase::*UnspecifiedBoolType); operator UnspecifiedBoolType() const { return m_resource ? &CachedResourceHandleBase::m_resource : 0; } protected: @@ -59,7 +60,7 @@ namespace WebCore { template <class R> class CachedResourceHandle : public CachedResourceHandleBase { public: CachedResourceHandle() { } - CachedResourceHandle(R* res) : CachedResourceHandleBase(res) { } + CachedResourceHandle(R* res); CachedResourceHandle(const CachedResourceHandle<R>& o) : CachedResourceHandleBase(o) { } R* get() const { return reinterpret_cast<R*>(CachedResourceHandleBase::get()); } @@ -70,6 +71,16 @@ namespace WebCore { bool operator==(const CachedResourceHandleBase& o) const { return get() == o.get(); } bool operator!=(const CachedResourceHandleBase& o) const { return get() != o.get(); } }; + + // Don't inline for winscw compiler to prevent the compiler agressively resolving + // the base class of R* when CachedResourceHandler<T>(R*) is inlined. + template <class R> +#if !COMPILER(WINSCW) + inline +#endif + CachedResourceHandle<R>::CachedResourceHandle(R* res) : CachedResourceHandleBase(res) + { + } template <class R, class RR> bool operator==(const CachedResourceHandle<R>& h, const RR* res) { |