From 2f3e8f407a4c143b751e0d7c2e255cd9bc78d15c Mon Sep 17 00:00:00 2001 From: Jan Wijffels Date: Tue, 26 May 2020 14:07:05 +0200 Subject: [PATCH] unsigned - signed comparison compiler remarks --- BTM.Rproj | 1 - src/doc.h | 2 +- src/pvec.h | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/BTM.Rproj b/BTM.Rproj index eaa6b81..5a4617f 100644 --- a/BTM.Rproj +++ b/BTM.Rproj @@ -13,6 +13,5 @@ RnwWeave: Sweave LaTeX: pdfLaTeX BuildType: Package -PackageUseDevtools: Yes PackageInstallArgs: --no-multiarch --with-keep.source PackageRoxygenize: rd,collate,namespace diff --git a/src/doc.h b/src/doc.h index c2e9158..4befd06 100644 --- a/src/doc.h +++ b/src/doc.h @@ -23,7 +23,7 @@ class Doc { const vector& get_ws() const {return ws;} const int get_w(int i) const { - assert(i < ws.size()); + assert(i < ((int)ws.size())); return ws[i]; } diff --git a/src/pvec.h b/src/pvec.h index 485ad01..5d7cf42 100644 --- a/src/pvec.h +++ b/src/pvec.h @@ -168,11 +168,11 @@ class Pvec { T &operator[](int i) { if (i >= (int)p.size()) Rcpp::Rcout << "ERR: index=" << i << ", size=" << p.size() << endl; - assert(i < p.size()); + assert(i < ((int)p.size())); return p[i]; } - const T& operator[](int i) const{assert(i operator+(const T & v){ Pvec tp(p.size());