Browse Source

Mono: fix bad long casts and wrong underlying enum types in GodotTools

Michael Belousov 5 years ago
parent
commit
9f61f1ed54

+ 1 - 1
modules/mono/editor/GodotTools/GodotTools/Build/BuildTool.cs

@@ -1,6 +1,6 @@
 namespace GodotTools.Build
 {
-    public enum BuildTool
+    public enum BuildTool : long
     {
         MsBuildMono,
         MsBuildVs,

+ 1 - 1
modules/mono/editor/GodotTools/GodotTools/ExternalEditorId.cs

@@ -1,6 +1,6 @@
 namespace GodotTools
 {
-    public enum ExternalEditorId
+    public enum ExternalEditorId : long
     {
         None,
         VisualStudio, // TODO (Windows-only)

+ 3 - 3
modules/mono/editor/GodotTools/GodotTools/Internals/ScriptClassParser.cs

@@ -13,9 +13,9 @@ namespace GodotTools.Internals
             public string Name { get; }
             public string Namespace { get; }
             public bool Nested { get; }
-            public int BaseCount { get; }
+            public long BaseCount { get; }
 
-            public ClassDecl(string name, string @namespace, bool nested, int baseCount)
+            public ClassDecl(string name, string @namespace, bool nested, long baseCount)
             {
                 Name = name;
                 Namespace = @namespace;
@@ -45,7 +45,7 @@ namespace GodotTools.Internals
                     (string)classDeclDict["name"],
                     (string)classDeclDict["namespace"],
                     (bool)classDeclDict["nested"],
-                    (int)classDeclDict["base_count"]
+                    (long)classDeclDict["base_count"]
                 ));
             }