Changeset 2923 in ntrip
- Timestamp:
- Jan 29, 2011, 12:01:06 PM (14 years ago)
- Location:
- trunk/BNC
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/BNC/bnctime.cpp ¶
r2917 r2923 84 84 ////////////////////////////////////////////////////////////////////////////// 85 85 bool 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 } 88 92 } 89 93 … … 91 95 ////////////////////////////////////////////////////////////////////////////// 92 96 bool 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 ////////////////////////////////////////////////////////////////////////////// 107 bool 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 ////////////////////////////////////////////////////////////////////////////// 118 bool 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 ////////////////////////////////////////////////////////////////////////////// 129 bool 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 ////////////////////////////////////////////////////////////////////////////// 140 bool bncTime::operator<=(const bncTime &time1) const { 141 if ( ((*this) - time1) <= 0.0 ) { 142 return true; 143 } 144 else { 145 return false; 146 } 95 147 } 96 148 -
TabularUnified trunk/BNC/bnctime.h ¶
r2917 r2923 25 25 bool operator==(const bncTime &time1) const; 26 26 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; 27 31 double operator-(const bncTime &time1) const; 28 32 bncTime operator-(double sec) const;
Note:
See TracChangeset
for help on using the changeset viewer.