Skip to content

Commit

Permalink
topo: fix multiple stations on same point
Browse files Browse the repository at this point in the history
  • Loading branch information
jmmuller committed Jul 2, 2024
1 parent 7974355 commit f97e337
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions MMVII/src/Topo/ctopodata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -270,10 +270,11 @@ bool cTopoData::addObs(std::vector<cTopoObsSetStationData> &aCurrentVectObsSetSt
if (code != eCompObsType::eCompHzOpen) // new set if HzOpen
{
// search for a suitable set
for (auto &aObsSet : aCurrentVectObsSetStations)
for (auto riter = aCurrentVectObsSetStations.rbegin();
riter != aCurrentVectObsSetStations.rend(); ++riter)
{
// TODO: must search from end
if ((!aObsSet.mObs.empty()) && (aObsSet.mObs.at(0).mPtsNames.at(0) == nameFrom))
auto &aObsSet = *riter;
if ((!aObsSet.mObs.empty()) && (aObsSet.mObs.front().mPtsNames.front() == nameFrom))
{
aSetDataStation = &aObsSet;
break;
Expand Down

0 comments on commit f97e337

Please sign in to comment.