MCPcopy Create free account
hub / github.com/Tablecruncher/tablecruncher / moveFlags

Method moveFlags

src/csvtable.cpp:961–973  ·  view source on GitHub ↗

* Move all flagged rows */

Source from the content-addressed store, hash-verified

959 * Move all flagged rows
960 */
961void CsvTable::moveFlags(table_index_t rowNr, table_index_t moveRows) {
962 std::set<table_index_t, std::greater<table_index_t> > newFlags;
963 for (auto it = flags.begin(); it != flags.end(); ++it) {
964 if( *it >= rowNr ) {
965 // move flagged rows from rowNr and up (visually down)
966 newFlags.insert(*it + moveRows);
967 } else {
968 // keep flagged rows that are lower than rowNr
969 newFlags.insert(*it);
970 }
971 }
972 flags = newFlags;
973}
974
975
976/**

Callers

nothing calls this directly

Calls 3

beginMethod · 0.45
endMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected