diff options
author | Guillem Jover <guillem@debian.org> | 2019-10-02 04:04:59 +0200 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2019-10-30 22:02:48 +0100 |
commit | 8da9c02a82840b6dbcecedfbc8e19264efd4dcbe (patch) | |
tree | 43202cf3b1252c9cd7c2e11d10324160f6f87974 | |
parent | 4cc04c4d9f8f5e8e7a2b19571836c69b7f382d45 (diff) | |
download | dpkg-8da9c02a82840b6dbcecedfbc8e19264efd4dcbe.tar.gz |
dselect: Make baselist::draw_column_*() col arguments const
Warned-by: cppcheck
Fixes: constParameter
-rw-r--r-- | debian/changelog | 1 | ||||
-rw-r--r-- | dselect/baselist.cc | 6 | ||||
-rw-r--r-- | dselect/dselect.h | 6 |
3 files changed, 7 insertions, 6 deletions
diff --git a/debian/changelog b/debian/changelog index 99b9b0de0..07ce962c9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -56,6 +56,7 @@ dpkg (1.20.0) UNRELEASED; urgency=medium - dpkg: Initialize flagdeppossi in check_conflict(). - libdpkg: Add new C locale switch over support. - libdpkg: Add new versiondescribe_c() to force a C locale. + - dselect: Make baselist::draw_column_*() col arguments const. * Build system: - Bump minimal Perl version to 5.24.1. - Add a serial versioning to the m4 files. diff --git a/dselect/baselist.cc b/dselect/baselist.cc index 6fd769239..4fa7f22b5 100644 --- a/dselect/baselist.cc +++ b/dselect/baselist.cc @@ -135,19 +135,19 @@ baselist::end_column(column &col, const char *title) } void -baselist::draw_column_head(column &col) +baselist::draw_column_head(const column &col) { mvwaddnstr(colheadspad, 0, col.x, col.title, col.width); } void -baselist::draw_column_sep(column &col, int y) +baselist::draw_column_sep(const column &col, int y) { mvwaddch(listpad, y, col.x - 1, ' '); } void -baselist::draw_column_item(column &col, int y, const char *item) +baselist::draw_column_item(const column &col, int y, const char *item) { mvwprintw(listpad, y, col.x, "%-*.*s", col.width, col.width, item); } diff --git a/dselect/dselect.h b/dselect/dselect.h index 383fb9516..e620f5af8 100644 --- a/dselect/dselect.h +++ b/dselect/dselect.h @@ -87,9 +87,9 @@ protected: void add_column(column &col, const char *title, int width); void end_column(column &col, const char *title); - void draw_column_head(column &col); - void draw_column_sep(column &col, int y); - void draw_column_item(column &col, int y, const char *item); + void draw_column_head(const column &col); + void draw_column_sep(const column &col, int y); + void draw_column_item(const column &col, int y, const char *item); // (n)curses stuff WINDOW *listpad, *infopad, *colheadspad, *thisstatepad; |