Skip to content

Commit

Permalink
Remove type comparison in == for RDWaveform
Browse files Browse the repository at this point in the history
  • Loading branch information
fhagemann authored and oschulz committed Jul 29, 2023
1 parent 27a708b commit b93d79c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/detector_waveforms.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ export RDWaveform
RDWaveform{T,U,TV,UV}(wf::RDWaveform) where {T,U,TV,UV} = RDWaveform{T,U,TV,UV}(wf.time, wf.signal)
Base.convert(::Type{RDWaveform{T,U,TV,UV}}, wf::RDWaveform) where {T,U,TV,UV} = RDWaveform{T,U,TV,UV}(wf)

Base.:(==)(wf1::RDWaveform, wf2::RDWaveform) =
typeof(wf1) == typeof(wf2) && wf1.time == wf2.time && wf1.signal == wf2.signal

Base.:(==)(a::RDWaveform, b::RDWaveform) = a.time == b.time && a.signal == b.signal
Base.isapprox(a::RDWaveform, b::RDWaveform; kwargs...) = isapprox(a.time, b.time; kwargs...) && isapprox(a.signal, b.signal; kwargs...)

Base.float(wf::RDWaveform) = RDWaveform(float(wf.time), float(wf.signal))
Expand Down

0 comments on commit b93d79c

Please sign in to comment.