From 74b07187c5ca52606ee16cf9e9029a5053107641 Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Sun, 1 Dec 2013 00:24:58 -0700 Subject: [PATCH] Portability: std::string:npos is not always appropriate for String::npos On some systems such as Windows MinGW the signed/unsigned property of std::string::npos does not match up with the Squdi String class size_type signed/unsigned property. Resulting in compiler signed vs unsigned mismatch errors when compiling. This is an iCelero project. --- src/SquidString.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SquidString.h b/src/SquidString.h index dabd1e204f..e8f69f3c3b 100644 --- a/src/SquidString.h +++ b/src/SquidString.h @@ -53,7 +53,7 @@ public: ~String(); typedef size_t size_type; //storage size intentionally unspecified - const static size_type npos = std::string::npos; + const static size_type npos = -1; String &operator =(char const *); String &operator =(String const &); -- 2.47.3