Minor performance tweak to handle LuaType casting better if type is already a LuaType

This commit is contained in:
2018-11-23 13:24:41 +01:00
parent ea24695128
commit 95f76bc5e3

View File

@@ -8,6 +8,7 @@ namespace Upsilon.BaseTypes
{ {
public static LuaType ToLuaType(this object o) public static LuaType ToLuaType(this object o)
{ {
if (o is LuaType type) return type;
switch (o) switch (o)
{ {
case bool b: case bool b: