@@ -150,12 +150,12 @@ function unpackVariable(dfg::G,
150
150
ppeDict = unpackPPEs ? JSON2. read (packedProps[" ppeDict" ], Dict{Symbol, MeanMaxPPE}) : Dict {Symbol, MeanMaxPPE} ()
151
151
smallData = JSON2. read (packedProps[" smallData" ], Dict{Symbol, SmallDataTypes})
152
152
153
- if haskey (packedProps, " softtype" )
153
+ variableTypeString = if haskey (packedProps, " softtype" )
154
154
# TODO Deprecate, remove in v0.12
155
155
@warn " Packed field `softtype` is deprecated and replaced with `variableType`"
156
- variableTypeString = packedProps[" softtype" ]
156
+ packedProps[" softtype" ]
157
157
else
158
- variableTypeString = packedProps[" variableType" ]
158
+ packedProps[" variableType" ]
159
159
end
160
160
161
161
variableType = getTypeFromSerializationModule (variableTypeString)
220
220
# returns a PackedVariableNodeData
221
221
function packVariableNodeData (:: G , d:: VariableNodeData{T} ) where {G <: AbstractDFG , T <: InferenceVariable }
222
222
@debug " Dispatching conversion variable -> packed variable for type $(string (d. variableType)) "
223
- # @show d.val
223
+ # TODO change to Vector{Vector{Float64}} which can be directly packed by JSON
224
224
castval = if 0 < length (d. val)
225
225
precast = getCoordinates .(T, d. val)
226
226
@cast castval[i,j] := precast[j][i]
0 commit comments