Drop byte from VS types

This commit is contained in:
Wojtek Figat
2021-07-29 19:45:33 +02:00
parent 1f59c43b04
commit 19da74f913
2 changed files with 1 additions and 8 deletions

View File

@@ -38,7 +38,6 @@ namespace FlaxEditor.Modules.SourceCodeEditing
{
// Add in-build types
_list.Add(new ScriptType(typeof(bool)));
_list.Add(new ScriptType(typeof(byte)));
_list.Add(new ScriptType(typeof(short)));
_list.Add(new ScriptType(typeof(ushort)));
_list.Add(new ScriptType(typeof(int)));

View File

@@ -3063,15 +3063,9 @@ void Variant::AllocStructure()
AsBlob.Data = Allocator::Allocate(AsBlob.Length);
type.Struct.Ctor(AsBlob.Data);
}
else if (typeName == "System.Byte")
{
// Hack for byte
AsBlob.Length = 1;
AsBlob.Data = Allocator::Allocate(AsBlob.Length);
*((byte*)AsBlob.Data) = 0;
}
else if (typeName == "System.Int16" || typeName == "System.UInt16")
{
// [Deprecated on 10.05.2021, expires on 10.05.2023]
// Hack for 16bit int
AsBlob.Length = 2;
AsBlob.Data = Allocator::Allocate(AsBlob.Length);