Changeset 2923 in ntrip


Ignore:
Timestamp:
Jan 29, 2011, 12:01:06 PM (13 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bnctime.cpp

    r2917 r2923  
    8484//////////////////////////////////////////////////////////////////////////////
    8585bool bncTime::operator!=(const bncTime &time1) const {
    86   if ( ((*this) - time1) != 0 ) return 1;
    87   return 0;
     86  if ( ((*this) - time1) != 0.0 ) {
     87    return true;
     88  }
     89  else {
     90    return false;
     91  }
    8892}
    8993
     
    9195//////////////////////////////////////////////////////////////////////////////
    9296bool bncTime::operator==(const bncTime &time1) const {
    93   if ( ((*this) - time1) == 0 ) return 1;
    94   return 0;
     97  if ( ((*this) - time1) == 0.0 ) {
     98    return true;
     99  }
     100  else {
     101    return false;
     102  }
     103}
     104
     105//
     106//////////////////////////////////////////////////////////////////////////////
     107bool bncTime::operator>(const bncTime &time1) const {
     108  if ( ((*this) - time1) > 0.0 ) {
     109    return true;
     110  }
     111  else {
     112    return false;
     113  }
     114}
     115
     116//
     117//////////////////////////////////////////////////////////////////////////////
     118bool bncTime::operator>=(const bncTime &time1) const {
     119  if ( ((*this) - time1) >= 0.0 ) {
     120    return true;
     121  }
     122  else {
     123    return false;
     124  }
     125}
     126
     127//
     128//////////////////////////////////////////////////////////////////////////////
     129bool bncTime::operator<(const bncTime &time1) const {
     130  if ( ((*this) - time1) < 0.0 ) {
     131    return true;
     132  }
     133  else {
     134    return false;
     135  }
     136}
     137
     138//
     139//////////////////////////////////////////////////////////////////////////////
     140bool bncTime::operator<=(const bncTime &time1) const {
     141  if ( ((*this) - time1) <= 0.0 ) {
     142    return true;
     143  }
     144  else {
     145    return false;
     146  }
    95147}
    96148
  • trunk/BNC/bnctime.h

    r2917 r2923  
    2525  bool         operator==(const bncTime &time1) const;
    2626  bool         operator!=(const bncTime &time1) const;
     27  bool         operator<(const bncTime &time1) const;
     28  bool         operator>(const bncTime &time1) const;
     29  bool         operator<=(const bncTime &time1) const;
     30  bool         operator>=(const bncTime &time1) const;
    2731  double       operator-(const bncTime &time1) const;
    2832  bncTime      operator-(double sec) const;
Note: See TracChangeset for help on using the changeset viewer.