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

Method addRow

src/csvtable.cpp:155–168  ·  view source on GitHub ↗

* Adds an empty row after (or before) the given rowNr */

Source from the content-addressed store, hash-verified

153 * Adds an empty row after (or before) the given rowNr
154 */
155void CsvTable::addRow(table_index_t rowNr, bool before) {
156 if( rowNr >= storage.rows() )
157 rowNr = storage.rows() - 1;
158 if( rowNr < 0 )
159 rowNr = 0;
160
161 storage.insertRow(rowNr, before);
162 if( before ) {
163 moveFlags(rowNr, 1);
164 } else {
165 moveFlags(rowNr+1, 1);
166 }
167 updateInternals();
168}
169
170
171/**

Callers 1

MyMenuCallbackMethod · 0.45

Calls 2

rowsMethod · 0.80
insertRowMethod · 0.80

Tested by

no test coverage detected