From ef2f3ddaf764f886fbb4d6004844fe88b8029cf2 Mon Sep 17 00:00:00 2001 From: Jeff Garzik Date: Sun, 15 Apr 2012 16:47:24 -0400 Subject: The string class returns string::npos, when find() fails. Noticed when sign-comparison warnings were enabled. --- src/irc.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/irc.cpp') diff --git a/src/irc.cpp b/src/irc.cpp index 5dfab06bac..5ac2306f16 100644 --- a/src/irc.cpp +++ b/src/irc.cpp @@ -156,13 +156,13 @@ int RecvUntil(SOCKET hSocket, const char* psz1, const char* psz2=NULL, const cha if (!RecvLineIRC(hSocket, strLine)) return 0; printf("IRC %s\n", strLine.c_str()); - if (psz1 && strLine.find(psz1) != -1) + if (psz1 && strLine.find(psz1) != string::npos) return 1; - if (psz2 && strLine.find(psz2) != -1) + if (psz2 && strLine.find(psz2) != string::npos) return 2; - if (psz3 && strLine.find(psz3) != -1) + if (psz3 && strLine.find(psz3) != string::npos) return 3; - if (psz4 && strLine.find(psz4) != -1) + if (psz4 && strLine.find(psz4) != string::npos) return 4; } } -- cgit v1.2.3