Skip to content

Commit 519c407

Browse files
Revert "Marshal String Encodings (HaxeFoundation#1283)"
This reverts commit 4cff17a.
1 parent 8fed3c5 commit 519c407

25 files changed

Lines changed: 472 additions & 1809 deletions

.gitignore

Lines changed: 0 additions & 406 deletions
Large diffs are not rendered by default.

include/Array.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ template<> struct ReturnNull<float> { typedef Dynamic type; };
4040
template<> struct ReturnNull<bool> { typedef Dynamic type; };
4141
template<> struct ReturnNull<char> { typedef Dynamic type; };
4242
template<> struct ReturnNull<char16_t> { typedef Dynamic type; };
43-
template<> struct ReturnNull<char32_t> { typedef Dynamic type; };
4443
template<> struct ReturnNull<signed char> { typedef Dynamic type; };
4544
template<> struct ReturnNull<unsigned char> { typedef Dynamic type; };
4645
template<> struct ReturnNull<short> { typedef Dynamic type; };
@@ -434,7 +433,6 @@ template<> struct ArrayClassId<signed char> { enum { id=hx::clsIdArrayByte }; };
434433
template<> struct ArrayClassId<unsigned short> { enum { id=hx::clsIdArrayShort }; };
435434
template<> struct ArrayClassId<signed short> { enum { id=hx::clsIdArrayShort }; };
436435
template<> struct ArrayClassId<char16_t> { enum { id = hx::clsIdArrayShort }; };
437-
template<> struct ArrayClassId<char32_t> { enum { id = hx::clsIdArrayInt }; };
438436
template<> struct ArrayClassId<unsigned int> { enum { id=hx::clsIdArrayInt }; };
439437
template<> struct ArrayClassId<signed int> { enum { id=hx::clsIdArrayInt }; };
440438
template<> struct ArrayClassId<float> { enum { id=hx::clsIdArrayFloat32 }; };

include/Dynamic.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ class HXCPP_EXTERN_CLASS_ATTRIBUTES Dynamic : public hx::ObjectPtr<hx::Object>
2525
Dynamic(unsigned char inVal);
2626
Dynamic(signed char inVal);
2727
Dynamic(char16_t inVal);
28-
Dynamic(char32_t inVal);
2928
Dynamic(const cpp::CppInt32__ &inVal);
3029
Dynamic(bool inVal);
3130
Dynamic(double inVal);
@@ -74,7 +73,6 @@ class HXCPP_EXTERN_CLASS_ATTRIBUTES Dynamic : public hx::ObjectPtr<hx::Object>
7473
inline operator char () const { return mPtr ? mPtr->__ToInt() : 0; }
7574
inline operator signed char () const { return mPtr ? mPtr->__ToInt() : 0; }
7675
inline operator char16_t () const { return mPtr ? mPtr->__ToInt() : 0; }
77-
inline operator char32_t () const { return mPtr ? mPtr->__ToInt() : 0; }
7876
inline operator bool() const { return mPtr && mPtr->__ToInt(); }
7977
inline operator cpp::Int64() const { return mPtr ? mPtr->__ToInt64() : 0; }
8078
inline operator cpp::UInt64() const { return mPtr ? mPtr->__ToInt64() : 0; }
@@ -176,7 +174,6 @@ class HXCPP_EXTERN_CLASS_ATTRIBUTES Dynamic : public hx::ObjectPtr<hx::Object>
176174
bool operator op (signed char inRHS) const { return IsNumeric() && ((double)(*this) op (double)inRHS); } \
177175
bool operator op (unsigned char inRHS) const { return IsNumeric() && ((double)(*this) op (double)inRHS); } \
178176
bool operator op (char16_t inRHS) const { return IsNumeric() && ((double)(*this) op (double)inRHS); } \
179-
bool operator op (char32_t inRHS) const { return IsNumeric() && ((double)(*this) op (double)inRHS); } \
180177
bool operator op (bool inRHS) const { return IsBool() && ((double)(*this) op (double)inRHS); } \
181178

182179
bool operator != (const String &inRHS) const { return !mPtr || ((String)(*this) != inRHS); }
@@ -191,7 +188,6 @@ class HXCPP_EXTERN_CLASS_ATTRIBUTES Dynamic : public hx::ObjectPtr<hx::Object>
191188
bool operator != (signed char inRHS) const { return !IsNumeric() || ((double)(*this) != (double)inRHS); }
192189
bool operator != (unsigned char inRHS) const { return !IsNumeric() || ((double)(*this) != (double)inRHS); }
193190
bool operator != (char16_t inRHS) const { return !IsNumeric() || ((double)(*this) != (double)inRHS); }
194-
bool operator != (char32_t inRHS) const { return !IsNumeric() || ((double)(*this) != (double)inRHS); }
195191
bool operator != (bool inRHS) const { return !IsBool() || ((double)(*this) != (double)inRHS); }
196192

197193

@@ -238,7 +234,6 @@ class HXCPP_EXTERN_CLASS_ATTRIBUTES Dynamic : public hx::ObjectPtr<hx::Object>
238234
Dynamic operator+(const signed char &i) const;
239235
Dynamic operator+(const unsigned char &i) const;
240236
Dynamic operator+(const char16_t& i) const;
241-
Dynamic operator+(const char32_t& i) const;
242237
Dynamic operator+(const double &d) const;
243238
Dynamic operator+(const float &d) const;
244239
Dynamic operator+(const cpp::Variant &d) const;
@@ -282,8 +277,6 @@ class HXCPP_EXTERN_CLASS_ATTRIBUTES Dynamic : public hx::ObjectPtr<hx::Object>
282277
{ return mPtr->__GetType()==vtInt ? Dynamic((int)(*this) op inRHS) : Dynamic((double)(*this) op inRHS); } \
283278
Dynamic operator op (const char16_t &inRHS) const \
284279
{ return mPtr->__GetType()==vtInt ? Dynamic((int)(*this) op inRHS) : Dynamic((double)(*this) op inRHS); } \
285-
Dynamic operator op (const char32_t &inRHS) const \
286-
{ return mPtr->__GetType()==vtInt ? Dynamic((int)(*this) op inRHS) : Dynamic((double)(*this) op inRHS); } \
287280
Dynamic operator op (const cpp::Int64 &inRHS) const \
288281
{ return Dynamic((double)(*this) op inRHS); } \
289282
Dynamic operator op (const cpp::UInt64 &inRHS) const \
@@ -472,7 +465,6 @@ COMPARE_DYNAMIC_OP( > )
472465
inline double operator op (const signed char &inLHS,const Dynamic &inRHS) { return inLHS op (double)inRHS; } \
473466
inline double operator op (const unsigned char &inLHS,const Dynamic &inRHS) { return inLHS op (double)inRHS; } \
474467
inline double operator op (const char16_t &inLHS,const Dynamic &inRHS) { return inLHS op (double)inRHS; } \
475-
inline double operator op (const char32_t &inLHS,const Dynamic &inRHS) { return inLHS op (double)inRHS; } \
476468

477469
ARITH_DYNAMIC( - )
478470
ARITH_DYNAMIC( + )

include/cpp/Variant.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ namespace cpp
110110
inline operator char () const { return asInt(); }
111111
inline operator signed char () const { return asInt(); }
112112
inline operator char16_t() const { return asInt(); }
113-
inline operator char32_t() const { return asInt(); }
114113
inline operator cpp::Int64 () const { return asInt64(); }
115114
inline operator cpp::UInt64 () const { return asInt64(); }
116115
inline bool operator !() const { return !asInt(); }
@@ -209,7 +208,6 @@ namespace cpp
209208
inline bool operator op (signed char inRHS) const { return isNumeric() && (asDouble() op (double)inRHS); } \
210209
inline bool operator op (unsigned char inRHS) const { return isNumeric() && (asDouble() op (double)inRHS); } \
211210
inline bool operator op (char16_t inRHS) const { return isNumeric() && (asDouble() op (double)inRHS); } \
212-
inline bool operator op (char32_t inRHS) const { return isNumeric() && (asDouble() op (double)inRHS); } \
213211
inline bool operator op (bool inRHS) const { return isBool() && (asDouble() op (double)inRHS); } \
214212
inline bool operator op (const Dynamic &inRHS) const { return Compare(inRHS) op 0; } \
215213

@@ -283,7 +281,6 @@ namespace cpp
283281
inline double operator op (const signed char &inLHS,const cpp::Variant &inRHS) { return inLHS op (double)inRHS; } \
284282
inline double operator op (const unsigned char &inLHS,const cpp::Variant &inRHS) { return inLHS op (double)inRHS; } \
285283
inline double operator op (const char16_t &inLHS,const cpp::Variant &inRHS) { return inLHS op (double)inRHS; } \
286-
inline double operator op (const char32_t &inLHS,const cpp::Variant &inRHS) { return inLHS op (double)inRHS; } \
287284
inline double operator op (const signed short &inLHS,const cpp::Variant &inRHS) { return inLHS op (double)inRHS; } \
288285
inline double operator op (const unsigned short &inLHS,const cpp::Variant &inRHS) { return inLHS op (double)inRHS; } \
289286
inline double operator op (const cpp::Int64 &inLHS,const cpp::Variant &inRHS) { return inLHS op (double)inRHS; } \
@@ -611,7 +608,6 @@ HX_VARIANT_OP_ISEQ(unsigned short)
611608
HX_VARIANT_OP_ISEQ(signed char)
612609
HX_VARIANT_OP_ISEQ(unsigned char)
613610
HX_VARIANT_OP_ISEQ(char16_t)
614-
HX_VARIANT_OP_ISEQ(char32_t)
615611
HX_VARIANT_OP_ISEQ(bool)
616612

617613
inline bool operator < (bool inLHS,const cpp::Variant &inRHS) { return false; }
@@ -643,8 +639,6 @@ inline bool operator > (bool inLHS,const cpp::Variant &inRHS) { return false; }
643639
{ return inRHS.isNumeric() && (inLHS op (double)inRHS); } \
644640
inline bool operator op (char16_t inLHS,const ::cpp::Variant &inRHS) \
645641
{ return inRHS.isNumeric() && (inLHS op (double)inRHS); } \
646-
inline bool operator op (char32_t inLHS,const ::cpp::Variant &inRHS) \
647-
{ return inRHS.isNumeric() && (inLHS op (double)inRHS); } \
648642
inline bool operator op (const null &,const ::cpp::Variant &inRHS) \
649643
{ return false; } \
650644

include/cpp/encoding/Ascii.hpp

Lines changed: 0 additions & 24 deletions
This file was deleted.

include/cpp/encoding/Utf16.hpp

Lines changed: 0 additions & 24 deletions
This file was deleted.

include/cpp/encoding/Utf8.hpp

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)