Browse Source

Adding support for unsigned short to C# bindings

Josh Engebretson 9 years ago
parent
commit
4b9dd1d93c

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

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

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

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