Changeset 1339 in 3DVCSoftware for branches/HTM-15.1-dev0-Nokia/source/Lib/TAppCommon
- Timestamp:
- 25 Sep 2015, 06:51:14 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-15.1-dev0-Nokia/source/Lib/TAppCommon/program_options_lite.h
r1328 r1339 405 405 xParseVec ( arg, opt_storage[ idcs[0] ][ idcs[1] ] ); 406 406 }; 407 #if SEI_DRI_F0169 408 template<> 409 inline void 410 Option< std::vector<std::vector<double>> >::parse(const std::string& arg, const IntAry1d& idcs, ErrorReporter&) 411 { 412 // xParseVec ( arg, opt_storage[ idcs[0] ] ); 413 char* pcNextStart = (char*) arg.data(); 414 char* pcEnd = pcNextStart + arg.length(); 415 416 char* pcOldStart = 0; 417 418 size_t iIdx = 0; 419 420 while (pcNextStart < pcEnd) 421 { 422 errno = 0; 423 424 if ( iIdx < opt_storage[idcs[0]].size() ) 425 { 426 opt_storage[idcs[0]][iIdx] = strtod(pcNextStart, &pcNextStart); 427 } 428 else 429 { 430 opt_storage[idcs[0]].push_back( strtod(pcNextStart, &pcNextStart)) ; 431 } 432 iIdx++; 433 434 if ( errno == ERANGE || (pcNextStart == pcOldStart) ) 435 { 436 std::cerr << "Error Parsing Doubles: `" << arg << "'" << std::endl; 437 exit(EXIT_FAILURE); 438 }; 439 while( (pcNextStart < pcEnd) && ( *pcNextStart == ' ' || *pcNextStart == '\t' || *pcNextStart == '\r' ) ) pcNextStart++; 440 pcOldStart = pcNextStart; 441 442 } 443 444 445 } 446 #endif 407 447 #else 408 448 template<>
Note: See TracChangeset for help on using the changeset viewer.