Changeset 4904 in ntrip for trunk/BNC/src/bncephuser.cpp


Ignore:
Timestamp:
Feb 9, 2013, 10:20:20 AM (9 years ago)
Author:
mervart
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/bncephuser.cpp

    r4784 r4904  
    111111    bncTime toc(ww, tow);
    112112    if (eLast->TOC() < toc) {
    113       delete static_cast<t_ephGlo*>(_eph.value(prn)->prev);
    114       _eph.value(prn)->prev = _eph.value(prn)->last;
    115       _eph.value(prn)->last = new t_ephGlo();
    116       static_cast<t_ephGlo*>(_eph.value(prn)->last)->set(&gloeph);
     113      t_ephGlo* ephGlo = new t_ephGlo();
     114      bool timeChanged;
     115      ephGlo->set(&gloeph, timeChanged);
     116      if (timeChanged) {
     117        delete ephGlo;
     118      }
     119      else {
     120        delete static_cast<t_ephGlo*>(_eph.value(prn)->prev);
     121        _eph.value(prn)->prev = _eph.value(prn)->last;
     122        _eph.value(prn)->last = ephGlo;
     123      }
    117124    }
    118125  }
    119126  else {
    120127    t_ephGlo* eLast = new t_ephGlo();
    121     eLast->set(&gloeph);
    122     _eph.insert(prn, new t_ephPair(eLast));
     128    bool timeChanged;
     129    eLast->set(&gloeph, timeChanged);
     130    if (timeChanged) {
     131      delete eLast;
     132    }
     133    else {
     134      _eph.insert(prn, new t_ephPair(eLast));
     135    }
    123136  }
    124137  ephBufferChanged();
Note: See TracChangeset for help on using the changeset viewer.