Meta - Fixed a bunch of build warnings

This commit is contained in:
Robert committed 2023-10-18 23:13:57 +02:00
1 parent 6921561317
commit 1bd4efbbc5
27 files changed
+199 -149

No files matched your search

@@ -11,7 +11,7 @@ namespace Artemis.VisualScripting.Converters;
public class JsonConverter : IValueConverter
{
/// <inheritdoc />
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
public object Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
return JsonConvert.SerializeObject(value, Formatting.Indented);
}
@@ -19,8 +19,7 @@ public class JsonConverter : IValueConverter
/// <inheritdoc />
public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
{
if (value == null)
return null;
return JsonConvert.DeserializeObject(value.ToString(), targetType);
string? json = value?.ToString();
return json == null ? null : JsonConvert.DeserializeObject(json, targetType);
}
}
@@ -44,7 +44,7 @@ public class EnumEqualsNodeCustomViewModel : CustomNodeViewModel
public ObservableCollection<EnumValueItem> EnumValues { get; } = new();
public EnumValueItem CurrentValue
public EnumValueItem? CurrentValue
{
get => EnumValues.FirstOrDefault(v => v.Value == _node.Storage);
set