From ed96f6d26367b180d993c558e6902a7afd18a81b Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Sat, 29 Jan 2011 22:46:41 -0700 Subject: [PATCH] Author: Francesco Chemolli Standard compliance fix: size_t is guaranteed unsigned --- src/String.cci | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/String.cci b/src/String.cci index 050de32bba..c2c6bebeac 100644 --- a/src/String.cci +++ b/src/String.cci @@ -175,7 +175,8 @@ String::set(char const *loc, char const ch) void String::cut(String::size_type newLength) { - if (newLength < 0 || newLength > len_) return; + // size_type is size_t, unsigned. No need to check for newLength <0 + if (newLength > len_) return; len_ = newLength; -- 2.47.2