Skip to content

Commit d5c446d

Browse files
committed
Remove unused functions with a bug
The `std::remove` only reorders the range, the lines are never erased.
1 parent 8fafa35 commit d5c446d

2 files changed

Lines changed: 0 additions & 14 deletions

File tree

libdnf/utils/smartcols/Table.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -99,24 +99,12 @@ void Table::addLine(const std::shared_ptr<Line> &line)
9999
lines.push_back(line);
100100
}
101101

102-
void Table::removeColumn(const std::shared_ptr<Column> &column)
103-
{
104-
std::remove(std::begin(columns), std::end(columns), column);
105-
scols_table_remove_column(table, column->column);
106-
}
107-
108102
void Table::removeColumns()
109103
{
110104
columns.clear();
111105
scols_table_remove_columns(table);
112106
}
113107

114-
void Table::removeLine(const std::shared_ptr<Line> &line)
115-
{
116-
std::remove(std::begin(lines), std::end(lines), line);
117-
scols_table_remove_line(table, line->line);
118-
}
119-
120108
void Table::removeLines()
121109
{
122110
lines.clear();

libdnf/utils/smartcols/Table.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,12 @@ class Table
9292
void enableNolinesep(bool enable) { scols_table_enable_nolinesep(table, enable); }
9393

9494
void addColumn(const std::shared_ptr<Column> &column);
95-
void removeColumn(const std::shared_ptr<Column> &column);
9695
void removeColumns();
9796
void moveColumn(const std::shared_ptr<Column> &before, const std::shared_ptr<Column> &toMove);
9897
std::shared_ptr<Column> newColumn(const std::string &name, double widthHint = 0, int flags = 0);
9998
std::shared_ptr<Column> nextColumn(std::vector<std::shared_ptr<Column>>::iterator &iterator) { return *(iterator++); }
10099

101100
void addLine(const std::shared_ptr<Line> &line);
102-
void removeLine(const std::shared_ptr<Line> &line);
103101
void removeLines();
104102
std::shared_ptr<Line> newLine();
105103
std::shared_ptr<Line> newLine(const std::shared_ptr<Line> &parent);

0 commit comments

Comments
 (0)