* Returns the index of the previous flagged row */
| 942 | * Returns the index of the previous flagged row |
| 943 | */ |
| 944 | table_index_t CsvTable::getPrevFlaggedRow(table_index_t rowNr) { |
| 945 | std::set<table_index_t, std::greater<table_index_t> >::const_iterator iterReturn; |
| 946 | if( flags.empty() ) { |
| 947 | return -1; |
| 948 | } |
| 949 | auto it = flags.upper_bound(rowNr); |
| 950 | if( it == flags.end() ) { |
| 951 | // it reached end - starting at the beginning |
| 952 | it = flags.begin(); |
| 953 | } |
| 954 | |
| 955 | return *it; |
| 956 | } |
| 957 | |
| 958 | /** |
| 959 | * Move all flagged rows |
no test coverage detected