Skip to content
Snippets Groups Projects
Commit 1893caba authored by Jan David Mol's avatar Jan David Mol
Browse files

Task #8993: C++11 fix: Avoid use of real() and imag() as lvalues.

parent eccfca7d
Branches
Tags
No related merge requests found
...@@ -202,9 +202,9 @@ void actionCollect(const std::string &filename, enum CollectingMode mode, Statis ...@@ -202,9 +202,9 @@ void actionCollect(const std::string &filename, enum CollectingMode mode, Statis
{ {
case CollectDefault: case CollectDefault:
if(antennaIsFlagged || timestepIndex < flaggedTimesteps) if(antennaIsFlagged || timestepIndex < flaggedTimesteps)
statisticsCollection.Add(antenna1Index, antenna2Index, time, bandIndex, p, &samples[p]->real(), &samples[p]->imag(), isRFI[p], correlatorFlagsForBadAntenna, band.channels.size() - startChannel, 2, 1, 1); statisticsCollection.Add(antenna1Index, antenna2Index, time, bandIndex, p, &reinterpret_cast<float*>(samples[p])[0], &reinterpret_cast<float*>(samples[p])[1], isRFI[p], correlatorFlagsForBadAntenna, band.channels.size() - startChannel, 2, 1, 1);
else else
statisticsCollection.Add(antenna1Index, antenna2Index, time, bandIndex, p, &samples[p]->real(), &samples[p]->imag(), isRFI[p], correlatorFlags, band.channels.size() - startChannel, 2, 1, 1); statisticsCollection.Add(antenna1Index, antenna2Index, time, bandIndex, p, &reinterpret_cast<float*>(samples[p])[0], &reinterpret_cast<float*>(samples[p])[1], isRFI[p], correlatorFlags, band.channels.size() - startChannel, 2, 1, 1);
break; break;
case CollectHistograms: case CollectHistograms:
histogramCollection.Add(antenna1Index, antenna2Index, p, samples[p], isRFI[p], band.channels.size() - startChannel); histogramCollection.Add(antenna1Index, antenna2Index, p, samples[p], isRFI[p], band.channels.size() - startChannel);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment