From 1148349cf4aeba4a2bc264365b0c9835561ab5fd Mon Sep 17 00:00:00 2001 From: Michael Chirico Date: Wed, 25 Jan 2023 08:23:16 -0800 Subject: [PATCH 1/2] remove const qualification of top-level function --- src/doc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/doc.h b/src/doc.h index 4befd06..e549a3e 100644 --- a/src/doc.h +++ b/src/doc.h @@ -22,7 +22,7 @@ class Doc { const vector& get_ws() const {return ws;} - const int get_w(int i) const { + int get_w(int i) const { assert(i < ((int)ws.size())); return ws[i]; } From f173cc764b51061d94a08a542c48620458c8a753 Mon Sep 17 00:00:00 2001 From: Michael Chirico Date: Wed, 25 Jan 2023 08:24:38 -0800 Subject: [PATCH 2/2] also in pmat.h --- src/pmat.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pmat.h b/src/pmat.h index f22b6a0..409f44b 100644 --- a/src/pmat.h +++ b/src/pmat.h @@ -126,9 +126,9 @@ class Pmat } } - const int rows() const {return array.size();} - const int size() const {return rows();} - const int cols() const {return rows()?array[0].size():0;} + int rows() const {return array.size();} + int size() const {return rows();} + int cols() const {return rows()?array[0].size():0;} Pvec &operator[] (int m){ if (m >= (int)array.size())