Fix comparison between pos and std::string::npos

std::string::npos is defined as the unsigned type size_t but given a value of -1,
resulting in a warning when trying to compare an unsigned int with a size_t.

Fix this by declaring pos as a size_t.
This commit is contained in:
Robert Knight 2011-08-24 11:28:32 +01:00
parent d922fc3f7a
commit 1318576cea

View file

@ -43,7 +43,7 @@ UpdateInstaller::Mode stringToMode(const std::string& modeStr)
void UpdaterOptions::parseOldFormatArg(const std::string& arg, std::string* key, std::string* value)
{
unsigned int pos = arg.find('=');
size_t pos = arg.find('=');
if (pos != std::string::npos)
{
*key = arg.substr(0,pos);