This is an automated email from the git hooks/post-receive script.

guillem pushed a commit to branch master
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=8da9c02a82840b6dbcecedfbc8e19264efd4dcbe

commit 8da9c02a82840b6dbcecedfbc8e19264efd4dcbe
Author: Guillem Jover <[email protected]>
AuthorDate: Wed Oct 2 04:04:59 2019 +0200

    dselect: Make baselist::draw_column_*() col arguments const
    
    Warned-by: cppcheck
    Fixes: constParameter
---
 debian/changelog    | 1 +
 dselect/baselist.cc | 6 +++---
 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;

-- 
Dpkg.Org's dpkg

Reply via email to