From a538f7956217e5ad78186b55c3717857265f8928 Mon Sep 17 00:00:00 2001 From: Cas Bex Date: Thu, 16 Nov 2023 11:45:06 +0100 Subject: [PATCH] Type stability for StringToValueReference --- src/FMI2/convert.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/FMI2/convert.jl b/src/FMI2/convert.jl index 5a8a30a..38cf25c 100644 --- a/src/FMI2/convert.jl +++ b/src/FMI2/convert.jl @@ -134,7 +134,7 @@ Returns the ValueReference or an array of ValueReferences coresponding to the va See also [`fmi2StringToValueReference`](@ref) """ function fmi2StringToValueReference(md::fmi2ModelDescription, name::String) - reference = nothing + reference = typemax(valtype(md.stringValueReferences)) if haskey(md.stringValueReferences, name) reference = md.stringValueReferences[name] else