Changeset 19140
- Timestamp:
- 08/05/18 12:43:21 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/fits2sql.cc
r19139 r19140 60 60 ("unsigned", vars<string>(), "In fits files per default columns are signed. This interpretss the column as unsigned value. Use the FITS column name.") 61 61 ("primary", vars<string>(), "List of columns to be used as primary keys during table creation (in connection with --create)") 62 ("first", var< int64_t>(int64_t(0)),"First event to start with (default: 0), mainly for test purpose")63 ("max", var< int64_t>(int64_t(0)),"Maximum number of events to process (0: all), mainly for test purpose")62 ("first", var<size_t>(size_t(0)), "First event to start with (default: 0), mainly for test purpose") 63 ("max", var<size_t>(size_t(0)), "Maximum number of events to process (0: all), mainly for test purpose") 64 64 ("engine", var<string>(""), "Database engine to be used when a new table is created") 65 65 ("row-format", var<string>(""), "Defines the ROW_FORMAT keyword for table creation") … … 288 288 289 289 const uint16_t verbose = conf.Get<uint16_t>("verbose"); 290 const int64_t first = conf.Get<int64_t>("first");291 const int64_t max = conf.Get<int64_t>("max");290 const size_t first = conf.Get<size_t>("first"); 291 const size_t max = conf.Get<size_t>("max"); 292 292 293 293 const bool force = conf.Get<bool>("force"); … … 315 315 const vector<string> duplicate = conf.Vec<string>("duplicate"); 316 316 const vector<string> notsigned = conf.Vec<string>("unsigned"); 317 318 if (first>=max) 319 cerr << "WARNING: Resource `first` (" << first << ") exceeds `max` (" << max << ")" << endl; 320 317 321 318 322 // ------------------------------------------------------------------------- … … 428 432 429 433 const size_t N = col.type=='A' ? 1 : col.num; 430 for ( int i=0; i<N; i++)434 for (size_t i=0; i<N; i++) 431 435 { 432 436 query += " `"+name; … … 570 574 { 571 575 const size_t N = c->type==kVarchar ? 1 : c->num; 572 for ( int i=0; i<N; i++)576 for (size_t i=0; i<N; i++) 573 577 { 574 578 if (c!=vec.cbegin()) … … 591 595 size_t count = 0; 592 596 593 const size_t num = max> 0&& (max-first)<f.GetNumRows() ? (max-first) : f.GetNumRows();597 const size_t num = max>first && (max-first)<f.GetNumRows() ? (max-first) : f.GetNumRows(); 594 598 for (size_t j=first; j<num; j++) 595 599 { … … 604 608 { 605 609 const size_t N = c->type==kVarchar ? 1 : c->num; 606 for ( int i=0; i<N; i++)610 for (size_t i=0; i<N; i++) 607 611 { 608 612 if (c!=vec.cbegin())
Note:
See TracChangeset
for help on using the changeset viewer.