Changeset 8401 in ntrip for trunk/BNC


Ignore:
Timestamp:
Jun 29, 2018, 1:21:43 PM (6 years ago)
Author:
stuerze
Message:

minor changes to prevent a crash of the program

Location:
trunk/BNC/src/PPP
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/PPP/pppEphPool.cpp

    r8215 r8401  
    8282/////////////////////////////////////////////////////////////////////////////
    8383void t_pppEphPool::t_satEphPool::putOrbCorrection(t_orbCorr* corr) {
     84  if (_ephs.empty()) {
     85    return;
     86  }
     87
    8488  for (unsigned ii = 0; ii < _ephs.size(); ii++) {
    8589    t_eph* eph = _ephs[ii];
     
    9498/////////////////////////////////////////////////////////////////////////////
    9599void t_pppEphPool::t_satEphPool::putClkCorrection(t_clkCorr* corr) {
     100  if (_ephs.empty()) {
     101    return;
     102  }
     103
    96104  for (unsigned ii = 0; ii < _ephs.size(); ii++) {
    97105    t_eph* eph = _ephs[ii];
     
    107115t_irc t_pppEphPool::t_satEphPool::getCrd(const bncTime& tt, ColumnVector& xc,
    108116                                           ColumnVector& vv) const {
     117  if (_ephs.empty()) {
     118    return failure;
     119  }
     120
    109121  for (unsigned ii = 0; ii < _ephs.size(); ii++) {
    110122    t_eph* eph = _ephs[ii];
     
    126138/////////////////////////////////////////////////////////////////////////////
    127139int t_pppEphPool::t_satEphPool::getChannel() const {
    128   if (_ephs.size() > 0) {
     140  if (!_ephs.empty()) {
    129141    return _ephs[0]->slotNum();
    130142  }
  • trunk/BNC/src/PPP/pppEphPool.h

    r7237 r8401  
    1414    _maxQueueSize = maxQueueSize;
    1515  }
    16   ~t_pppEphPool() {}; 
     16  ~t_pppEphPool() {};
    1717
    1818  void putEphemeris(t_eph* eph);
     
    2020  void putClkCorrection(t_clkCorr* corr);
    2121
    22   t_irc getCrd(const t_prn& prn, const bncTime& tt, 
     22  t_irc getCrd(const t_prn& prn, const bncTime& tt,
    2323                    ColumnVector& xc, ColumnVector& vv) const;
    2424
     
    3535    t_satEphPool() {};
    3636    ~t_satEphPool() {
     37      if (_ephs.empty()) return;
    3738      for (unsigned ii = 0; ii < _ephs.size(); ii++) {
    3839        delete _ephs[ii];
     
    4243    void putOrbCorrection(t_orbCorr* corr);
    4344    void putClkCorrection(t_clkCorr* corr);
    44     t_irc getCrd(const bncTime& tt, 
     45    t_irc getCrd(const bncTime& tt,
    4546                      ColumnVector& xc, ColumnVector& vv) const;
    4647    int getChannel() const;
Note: See TracChangeset for help on using the changeset viewer.