Browse Source

Merge pull request #1115 from AtomicGameEngine/JME-ATOMIC-1073

Adding support for unsigned short to C# bindings
JoshEngebretson 9 years ago
parent
commit
013a6cf58e

+ 2 - 0
Source/ToolCore/JSBind/CSharp/CSTypeHelper.cpp

@@ -159,6 +159,8 @@ String CSTypeHelper::GetManagedPrimitiveType(JSBPrimitiveType* ptype)
         return "byte";
         return "byte";
     if (ptype->kind_ == JSBPrimitiveType::Char)
     if (ptype->kind_ == JSBPrimitiveType::Char)
         return "char";
         return "char";
+    if (ptype->kind_ == JSBPrimitiveType::Short && ptype->isUnsigned_)
+        return "ushort";
     if (ptype->kind_ == JSBPrimitiveType::Short)
     if (ptype->kind_ == JSBPrimitiveType::Short)
         return "short";
         return "short";
     if (ptype->kind_ == JSBPrimitiveType::LongLong)
     if (ptype->kind_ == JSBPrimitiveType::LongLong)

+ 2 - 0
Source/ToolCore/JSBind/JSBType.h

@@ -114,6 +114,8 @@ public:
         case Bool:
         case Bool:
             return "bool";
             return "bool";
         case Short:
         case Short:
+            if (isUnsigned_)
+                return "unsigned short";
             return "short";
             return "short";
         case Int:
         case Int:
             if (isUnsigned_)
             if (isUnsigned_)