Skip to content

Commit 14edc09

Browse files
Apply suggestions from code review
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 830f507 commit 14edc09

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

src/entities/DFGFactor.jl

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ end
6060
inflation::Float64 = 0.0
6161
end
6262

63-
6463
# TODO should we move non FactorOperationalMemory to FactorCompute:
6564
# fnc, multihypo, nullhypo, inflation ?
6665
# that way we split solverData <: FactorOperationalMemory and constants
@@ -179,7 +178,6 @@ function FactorDFG(
179178
)
180179
end
181180

182-
183181
FactorDFG(f::FactorDFG) = f
184182

185183
# TODO consolidate to just one type
@@ -285,7 +283,6 @@ Base.@kwdef struct FactorCompute{FT <: AbstractFactor, N} <: AbstractDFGFactor
285283
observation::FT
286284
state::FactorState
287285
computeMem::Base.RefValue{<:FactorOperationalMemory} #TODO easy of use vs. performance as container is abstract in any case.
288-
289286
end
290287

291288
##------------------------------------------------------------------------------
@@ -343,9 +340,7 @@ function FactorCompute(
343340
id::Union{UUID, Nothing} = nothing,
344341
smallData::Dict{Symbol, SmallDataTypes} = Dict{Symbol, SmallDataTypes}(),
345342
)
346-
347343
observation = getFactorType(solverData)
348-
349344
state = FactorState(
350345
solverData.eliminated,
351346
solverData.potentialused,

src/services/Serialization.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,6 @@ function unpackFactor(dfg::AbstractDFG, factor::FactorDFG; skipVersionCheck::Boo
407407
else
408408
computeMem = Ref{FactorOperationalMemory}()
409409
end
410-
411410
return FactorCompute(
412411
factor.label,
413412
factor.timestamp,
@@ -426,7 +425,7 @@ end
426425

427426
function unpackObservation(factor::FactorDFG)
428427
#FIXME completely refactor to not need getTypeFromSerializationModule and just use StructTypes
429-
observpacked = getObservation(factor)
428+
observpacked = getObservation(factor)
430429
#TODO change to unpack: observ = unpack(observpacked)
431430
packtype = DFG.getTypeFromSerializationModule("Packed" * factor.fnctype)
432431
return convert(convertStructType(packtype), observpacked)

0 commit comments

Comments
 (0)