Skip to content

Commit

Permalink
Use intermediate integer to pass enum to QDataStream::operator>>
Browse files Browse the repository at this point in the history
  • Loading branch information
f4exb committed Jan 23, 2022
1 parent 85184e2 commit e40032e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sdrbase/dsp/spectrumsettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ QDataStream& operator<<(QDataStream& out, const SpectrumAnnotationMarker& marker
out << marker.m_startFrequency;
out << marker.m_bandwidth;
out << marker.m_markerColor;
out << marker.m_show;
out << (int) marker.m_show;
out << marker.m_text;
return out;
}
Expand Down Expand Up @@ -221,11 +221,13 @@ bool SpectrumSettings::deserialize(const QByteArray& data)

QDataStream& operator>>(QDataStream& in, SpectrumAnnotationMarker& marker)
{
int tmp;
in >> marker.m_startFrequency;
in >> marker.m_bandwidth;
in >> marker.m_markerColor;
in >> marker.m_show;
in >> tmp;
in >> marker.m_text;
marker.m_show = (SpectrumAnnotationMarker::ShowState) tmp;
return in;
}

Expand Down

0 comments on commit e40032e

Please sign in to comment.