Changeset 3664 in ntrip for trunk/BNC/bncutils.cpp
- Timestamp:
- Feb 11, 2012, 4:33:33 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncutils.cpp
r3408 r3664 387 387 } 388 388 389 // 390 //////////////////////////////////////////////////////////////////////////// 391 int readInt(const QString& str, int pos, int len, int& value) { 392 bool ok; 393 value = str.mid(pos, len).toInt(&ok); 394 return ok ? 0 : 1; 395 } 396 397 // 398 //////////////////////////////////////////////////////////////////////////// 399 int readDbl(const QString& str, int pos, int len, double& value) { 400 QString hlp = str.mid(pos, len); 401 for (int ii = 0; ii < hlp.length(); ii++) { 402 if (hlp[ii]=='D' || hlp[ii]=='d' || hlp[ii] == 'E') { 403 hlp[ii]='e'; 404 } 405 } 406 bool ok; 407 value = hlp.toDouble(&ok); 408 return ok ? 0 : 1; 409 }
Note:
See TracChangeset
for help on using the changeset viewer.