summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2016-06-19 13:09:25 +0200
committerGitHub <noreply@github.com>2016-06-19 13:09:25 +0200
commitdf202127e3096c7e8b5188c4d29f38b03cae1658 (patch)
tree7aa338b6b9ff228fe681fe79883b2e76231128fd
parentb9f944ed5c68f6b2d23866cd718510596080749c (diff)
parent449571b6cd48083fb34a4f7aebe6758cd527afc9 (diff)
Merge pull request #5281 from J08nY/useless-preprocessor
Fix #5263: Useless preprocessor condition
-rw-r--r--core/math/vector3.h13
-rw-r--r--core/ustring.h6
-rw-r--r--core/variant.cpp4
-rw-r--r--core/variant.h7
4 files changed, 5 insertions, 25 deletions
diff --git a/core/math/vector3.h b/core/math/vector3.h
index 528c4d37b3..910446023a 100644
--- a/core/math/vector3.h
+++ b/core/math/vector3.h
@@ -44,18 +44,6 @@ struct Vector3 {
};
union {
-
-#ifdef USE_QUAD_VECTORS
-
- struct {
- real_t x;
- real_t y;
- real_t z;
- real_t _unused;
- };
- real_t coord[4];
-#else
-
struct {
real_t x;
real_t y;
@@ -63,7 +51,6 @@ struct Vector3 {
};
real_t coord[3];
-#endif
};
_FORCE_INLINE_ const real_t& operator[](int p_axis) const {
diff --git a/core/ustring.h b/core/ustring.h
index 95096e8f76..8aceb0748c 100644
--- a/core/ustring.h
+++ b/core/ustring.h
@@ -46,11 +46,9 @@ public:
operator const char*() {return get_data();};
};
-#ifndef CHARTYPE_16BITS
+
typedef wchar_t CharType;
-#else
-typedef wchar_t uint16_t;
-#endif
+
struct StrRange {
diff --git a/core/variant.cpp b/core/variant.cpp
index 472d6cf568..81d10f379a 100644
--- a/core/variant.cpp
+++ b/core/variant.cpp
@@ -1445,12 +1445,12 @@ Variant::operator unsigned char() const {
return 0;
}
-#ifndef CHARTYPE_16BITS
+
Variant::operator CharType() const {
return operator unsigned int();
}
-#endif
+
Variant::operator float() const {
diff --git a/core/variant.h b/core/variant.h
index b95223ecfb..9c93ecb73b 100644
--- a/core/variant.h
+++ b/core/variant.h
@@ -151,11 +151,7 @@ private:
InputEvent *_input_event;
Image *_image;
void *_ptr; //generic pointer
-#ifdef USE_QUAD_VECTORS
- uint8_t _mem[sizeof(ObjData) > (sizeof(real_t)*5) ? sizeof(ObjData) : (sizeof(real_t)*5)]; // plane uses an extra real
-#else
uint8_t _mem[sizeof(ObjData) > (sizeof(real_t)*4) ? sizeof(ObjData) : (sizeof(real_t)*4)];
-#endif
} _data;
@@ -202,9 +198,8 @@ public:
operator unsigned long() const;
#endif
-#ifndef CHARTYPE_16BITS
+
operator CharType() const;
-#endif
operator float() const;
operator double() const;
operator String() const;