Browse Source

Add Int64 support to Serializable::OnSetAttribute and Serializable::OnGetAttribute

Rokas Kupstys 8 years ago
parent
commit
b8689422cc
1 changed files with 8 additions and 0 deletions
  1. 8 0
      Source/Urho3D/Scene/Serializable.cpp

+ 8 - 0
Source/Urho3D/Scene/Serializable.cpp

@@ -86,6 +86,10 @@ void Serializable::OnSetAttribute(const AttributeInfo& attr, const Variant& src)
             *(reinterpret_cast<int*>(dest)) = src.GetInt();
             *(reinterpret_cast<int*>(dest)) = src.GetInt();
         break;
         break;
 
 
+    case VAR_INT64:
+        *(reinterpret_cast<unsigned long long*>(dest)) = src.GetUInt64();
+        break;
+
     case VAR_BOOL:
     case VAR_BOOL:
         *(reinterpret_cast<bool*>(dest)) = src.GetBool();
         *(reinterpret_cast<bool*>(dest)) = src.GetBool();
         break;
         break;
@@ -191,6 +195,10 @@ void Serializable::OnGetAttribute(const AttributeInfo& attr, Variant& dest) cons
             dest = *(reinterpret_cast<const int*>(src));
             dest = *(reinterpret_cast<const int*>(src));
         break;
         break;
 
 
+    case VAR_INT64:
+        dest = *(reinterpret_cast<const unsigned long long*>(src));
+        break;
+
     case VAR_BOOL:
     case VAR_BOOL:
         dest = *(reinterpret_cast<const bool*>(src));
         dest = *(reinterpret_cast<const bool*>(src));
         break;
         break;