diff options
author | Paul Gilbert | 2017-03-28 18:50:58 -0400 |
---|---|---|
committer | Paul Gilbert | 2017-03-28 18:50:58 -0400 |
commit | 4564b84d918e13bfceed4338aa3111bf468b0f0e (patch) | |
tree | b171b60ee095bbae2302f515ae05400a75b96114 | |
parent | dc5ed954d5b84eeedfb98ef4d01f70156a58e4ce (diff) | |
download | scummvm-rg350-4564b84d918e13bfceed4338aa3111bf468b0f0e.tar.gz scummvm-rg350-4564b84d918e13bfceed4338aa3111bf468b0f0e.tar.bz2 scummvm-rg350-4564b84d918e13bfceed4338aa3111bf468b0f0e.zip |
COMMON: Compilation fix for Visual Studio 2015
The SpanImpl template was generating a bunch of C2248 errors that
protected fields of the SpanBase template could not be accessed
-rw-r--r-- | common/span.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/common/span.h b/common/span.h index 2acc0b5fe7..e11737aaf2 100644 --- a/common/span.h +++ b/common/span.h @@ -280,9 +280,11 @@ public: inline size_type byteSize() const { return impl().size() * sizeof(value_type); } +#if !defined(_MSC_VER) #if !defined(__GNUC__) || GCC_ATLEAST(3, 0) protected: #endif +#endif inline SpanBase() {} inline SpanBase(const SpanBase &) {} inline SpanBase &operator=(const SpanBase &) { return this->impl(); } @@ -294,9 +296,11 @@ protected: #pragma mark - #pragma mark SpanBase - Interface +#if !defined(_MSC_VER) #if !defined(__GNUC__) || GCC_ATLEAST(3, 0) protected: #endif +#endif inline void clear(); inline size_type size() const; @@ -475,9 +479,11 @@ public: return !operator<(other); } +#if !defined(_MSC_VER) #if !defined(__GNUC__) || GCC_ATLEAST(3, 0) protected: #endif +#endif inline bool operator_bool() const { return impl().data() != nullptr; } #pragma mark - @@ -506,9 +512,11 @@ public: #pragma mark - #pragma mark SpanBase - Validation +#if !defined(_MSC_VER) #if !defined(__GNUC__) || GCC_ATLEAST(3, 0) protected: #endif +#endif /** * @returns true if bounds are invalid. */ @@ -627,9 +635,11 @@ public: return subspan<value_type>(index, numEntries); } +#if !defined(_MSC_VER) #if !defined(__GNUC__) || GCC_ATLEAST(3, 0) protected: #endif +#endif template <typename NewValueType> void populateSubspan(Derived<NewValueType> &span, const index_type index, size_type numEntries) const { if (numEntries == kSpanMaxSize) { @@ -788,9 +798,11 @@ public: return subspan<value_type>(index, numEntries, name_, sourceByteOffset_); } +#if !defined(_MSC_VER) #if !defined(__GNUC__) || GCC_ATLEAST(3, 0) protected: #endif +#endif template <typename NewValueType> void populateSubspan(Derived<NewValueType> &span, const index_type index, size_type numEntries, const String &name_, const size_type sourceByteOffset_ = kSpanKeepOffset) const { super_type::template populateSubspan<NewValueType>(span, index, numEntries); @@ -968,9 +980,11 @@ public: _span.clear(); } +#if !defined(_MSC_VER) #if !defined(__GNUC__) || GCC_ATLEAST(3, 0) protected: #endif +#endif inline bool operator_bool() const { return _span; } private: |