From 98ab357df0bd50b1f508242d98e2403fe038ba38 Mon Sep 17 00:00:00 2001 From: Japa Date: Sat, 15 Oct 2016 10:17:38 +0530 Subject: [PATCH] Use size_t in both path methods, to avoid warning C4267 --- library/include/df/custom/coord2d_path.methods.inc | 6 +++--- library/include/df/custom/coord_path.methods.inc | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/library/include/df/custom/coord2d_path.methods.inc b/library/include/df/custom/coord2d_path.methods.inc index c36c5c0fa..623dfe758 100644 --- a/library/include/df/custom/coord2d_path.methods.inc +++ b/library/include/df/custom/coord2d_path.methods.inc @@ -1,13 +1,13 @@ -unsigned size() const { return x.size(); } +size_t size() const { return x.size(); } -coord2d operator[] (unsigned idx) const { +coord2d operator[] (size_t idx) const { if (idx >= x.size()) return coord2d(); else return coord2d(x[idx], y[idx]); } -void erase(unsigned idx) { +void erase(size_t idx) { if (idx < x.size()) { x.erase(x.begin()+idx); y.erase(y.begin()+idx); diff --git a/library/include/df/custom/coord_path.methods.inc b/library/include/df/custom/coord_path.methods.inc index 5421796e3..cc9a67fa1 100644 --- a/library/include/df/custom/coord_path.methods.inc +++ b/library/include/df/custom/coord_path.methods.inc @@ -1,5 +1,5 @@ bool empty() const { return x.empty(); } -unsigned size() const { return x.size(); } +size_t size() const { return x.size(); } void clear() { x.clear(); @@ -7,14 +7,14 @@ void clear() { z.clear(); } -coord operator[] (unsigned idx) const { +coord operator[] (size_t idx) const { if (idx >= x.size()) return coord(); else return coord(x[idx], y[idx], z[idx]); } -void erase(unsigned idx) { +void erase(size_t idx) { if (idx < x.size()) { x.erase(x.begin()+idx); y.erase(y.begin()+idx);