mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Replace AsEnumValue for performance
This commit is contained in:
@@ -49,7 +49,7 @@ namespace SabreTools.DatItems.Formats
|
||||
if (GetBoolFieldValue(Models.Metadata.Device.MandatoryKey) != null)
|
||||
SetFieldValue<string?>(Models.Metadata.Device.MandatoryKey, GetBoolFieldValue(Models.Metadata.Device.MandatoryKey).FromYesNo());
|
||||
if (GetStringFieldValue(Models.Metadata.Device.DeviceTypeKey) != null)
|
||||
SetFieldValue<string?>(Models.Metadata.Device.DeviceTypeKey, GetStringFieldValue(Models.Metadata.Device.DeviceTypeKey).AsEnumValue<DeviceType>().AsStringValue());
|
||||
SetFieldValue<string?>(Models.Metadata.Device.DeviceTypeKey, GetStringFieldValue(Models.Metadata.Device.DeviceTypeKey).AsDeviceType().AsStringValue());
|
||||
|
||||
// Handle subitems
|
||||
var instance = item.Read<Models.Metadata.Instance>(Models.Metadata.Device.InstanceKey);
|
||||
|
||||
Reference in New Issue
Block a user