Browse Source

Added UInt generation where it needs

rsredsq 10 years ago
parent
commit
0465fde9ba
2 changed files with 3 additions and 4 deletions
  1. 0 0
      Script/Haxe/.gitkeep
  2. 3 4
      Source/ToolCore/JSBind/JSBHaxe.cpp

+ 0 - 0
Script/Haxe/.gitkeep


+ 3 - 4
Source/ToolCore/JSBind/JSBHaxe.cpp

@@ -22,7 +22,9 @@ namespace ToolCore
             JSBPrimitiveType* ptype = ftype->type_->asPrimitiveType();
             JSBPrimitiveType* ptype = ftype->type_->asPrimitiveType();
             if (ptype->kind_ == JSBPrimitiveType::Bool)
             if (ptype->kind_ == JSBPrimitiveType::Bool)
                 scriptType = "Bool";
                 scriptType = "Bool";
-            if (ptype->kind_ == JSBPrimitiveType::Int)
+            if (ptype->kind_ == JSBPrimitiveType::Int && ptype->isUnsigned_)
+                scriptType = "UInt";
+            else if (ptype->kind_ == JSBPrimitiveType::Int)
                 scriptType = "Int";
                 scriptType = "Int";
             if (ptype->kind_ == JSBPrimitiveType::Float)
             if (ptype->kind_ == JSBPrimitiveType::Float)
                 scriptType = "Float";
                 scriptType = "Float";
@@ -34,9 +36,6 @@ namespace ToolCore
         if (ftype->type_->asEnumType())
         if (ftype->type_->asEnumType())
             scriptType = ftype->type_->asEnumType()->enum_->GetName();
             scriptType = ftype->type_->asEnumType()->enum_->GetName();
 
 
-        if (ftype->type_->asEnumType())
-            scriptType = ftype->type_->asEnumType()->enum_->GetName();
-
         if (ftype->type_->asClassType())
         if (ftype->type_->asClassType())
         {
         {
             JSBClass* klass = ftype->type_->asClassType()->class_;
             JSBClass* klass = ftype->type_->asClassType()->class_;