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]; } 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())