aboutsummaryrefslogtreecommitdiff
path: root/Gem/develop
diff options
context:
space:
mode:
authorTravis CI <zmoelnig@travis-ci.umlaeute.mur.at>2016-12-22 10:17:41 +0000
committerTravis CI <zmoelnig@travis-ci.umlaeute.mur.at>2016-12-22 10:17:41 +0000
commit48351101d6169c18542224f9efa8d26f0af4201a (patch)
tree8c692827347bed3829428b769afcdf1985316cbc /Gem/develop
parenta512c47bf92e93b77258aec5ddfb8f366a16beb4 (diff)
Gem cb323f8641d6d15e14a9946ad2b35c74578f6a80 osx/i386
built 'master:cb323f8641d6d15e14a9946ad2b35c74578f6a80' for osx/i386
Diffstat (limited to 'Gem/develop')
-rw-r--r--Gem/develop/include/Gem/Gem/GLStack.h5
-rw-r--r--Gem/develop/include/Gem/Utils/any.h18
2 files changed, 19 insertions, 4 deletions
diff --git a/Gem/develop/include/Gem/Gem/GLStack.h b/Gem/develop/include/Gem/Gem/GLStack.h
index 2584578..4c9037c 100644
--- a/Gem/develop/include/Gem/Gem/GLStack.h
+++ b/Gem/develop/include/Gem/Gem/GLStack.h
@@ -65,7 +65,12 @@ class GEM_EXTERN GLStack {
private:
class Data;
+ // try using unique_ptr<> if it is supported
+#if __cplusplus < 201103L
std::auto_ptr<Data>data;
+#else
+ std::unique_ptr<Data>data;
+#endif
};
} /* namespace gem */
diff --git a/Gem/develop/include/Gem/Utils/any.h b/Gem/develop/include/Gem/Utils/any.h
index fc66b46..dff11bb 100644
--- a/Gem/develop/include/Gem/Utils/any.h
+++ b/Gem/develop/include/Gem/Utils/any.h
@@ -132,12 +132,19 @@ namespace gem
template <typename T>
any(const T& x) : table(NULL), object(NULL) {
table = any_detail::get_table<T>::get();
+#if defined(__GNUC__) && __GNUC__ >= 6
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wplacement-new"
+#endif
if (sizeof(T) <= sizeof(void*)) {
new(&object) T(x);
}
else {
object = new T(x);
}
+#if defined(__GNUC__) && __GNUC__ >= 6
+# pragma GCC diagnostic pop
+#endif
}
any(void) : table(NULL), object(NULL) {
@@ -181,14 +188,16 @@ namespace gem
if (table == x_table) {
// if so, we can avoid deallocating and resuse memory
+#if defined(__GNUC__) && __GNUC__ >= 6
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wplacement-new"
+#endif
if (sizeof(T) <= sizeof(void*)) {
// create copy on-top of object pointer itself
-
new(&object) T(x);
}
else {
// create copy on-top of old version
-
new(object) T(x);
}
}
@@ -196,16 +205,17 @@ namespace gem
reset();
if (sizeof(T) <= sizeof(void*)) {
// create copy on-top of object pointer itself
-
new(&object) T(x);
// update table pointer
-
table = x_table;
}
else {
object = new T(x);
table = x_table;
}
+#if defined(__GNUC__) && __GNUC__ >= 6
+# pragma GCC diagnostic pop
+#endif
}
return *this;
}