[Scummvm-git-logs] scummvm master -> 4564b84d918e13bfceed4338aa3111bf468b0f0e

dreammaster dreammaster at scummvm.org
Wed Mar 29 00:52:13 CEST 2017


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
4564b84d91 COMMON: Compilation fix for Visual Studio 2015


Commit: 4564b84d918e13bfceed4338aa3111bf468b0f0e
    https://github.com/scummvm/scummvm/commit/4564b84d918e13bfceed4338aa3111bf468b0f0e
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-03-28T18:50:58-04:00

Commit Message:
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

Changed paths:
    common/span.h


diff --git a/common/span.h b/common/span.h
index 2acc0b5..e11737a 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:





More information about the Scummvm-git-logs mailing list