mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +00:00
Yeah I can't remember looks like I fixed a bunch of warnings
This commit is contained in:
1 parent
65837e671a
commit
a735568c8f
17 files changed
+35
-43
No files matched your search
@@ -45,7 +45,9 @@ namespace Artemis.VisualScripting.Ninject
|
||||
|
||||
private void InjectUserDefinedFunctions()
|
||||
{
|
||||
IFunctionReader functionReader = (IFunctionReader) Kernel!.GetService(typeof(IFunctionReader));
|
||||
IFunctionReader? functionReader = (IFunctionReader?) Kernel?.GetService(typeof(IFunctionReader));
|
||||
if (functionReader == null)
|
||||
throw new Exception($"Could not get service of type {nameof(IFunctionReader)}.");
|
||||
NoStringFunctionsInitializer.InitializeFunctions(functionReader, typeof(NoStringNinjectModule));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ public class ConvertToNumericNode : Node
|
||||
};
|
||||
}
|
||||
|
||||
private Numeric TryParse(object input)
|
||||
private Numeric TryParse(object? input)
|
||||
{
|
||||
Numeric.TryParse(input?.ToString(), out Numeric value);
|
||||
return value;
|
||||
|
||||
@@ -24,7 +24,7 @@ public class PinsVariablesContainer : IVariablesContainer
|
||||
/// <inheritdoc />
|
||||
public EvaluatorValue GetValue(string name)
|
||||
{
|
||||
IPin pin = _values.FirstOrDefault(v => v.Name == name);
|
||||
IPin? pin = _values.FirstOrDefault(v => v.Name == name);
|
||||
if (pin?.PinValue is Numeric numeric)
|
||||
return new EvaluatorValue(numeric);
|
||||
return new EvaluatorValue(0);
|
||||
@@ -33,7 +33,7 @@ public class PinsVariablesContainer : IVariablesContainer
|
||||
/// <inheritdoc />
|
||||
public bool TryGetValue(string name, out EvaluatorValue value)
|
||||
{
|
||||
IPin pin = _values.FirstOrDefault(v => v.Name == name);
|
||||
IPin? pin = _values.FirstOrDefault(v => v.Name == name);
|
||||
if (pin?.PinValue is Numeric numeric)
|
||||
{
|
||||
value = new EvaluatorValue(numeric);
|
||||
|
||||
Reference in new issue
Block a user