fix std::string::size_type type

This commit is contained in:
Arvid Norberg 2010-03-06 03:57:48 +00:00
parent a7e6ce7c00
commit b835b03ae8
3 changed files with 3 additions and 3 deletions

View File

@ -72,7 +72,7 @@ namespace libtorrent
TORRENT_EXPORT std::string base32decode(std::string const& s); TORRENT_EXPORT std::string base32decode(std::string const& s);
TORRENT_EXPORT std::string url_has_argument( TORRENT_EXPORT std::string url_has_argument(
std::string const& url, std::string argument, int* out_pos = 0); std::string const& url, std::string argument, std::string::size_type* out_pos = 0);
// replaces \ with / // replaces \ with /
TORRENT_EXPORT void convert_path_to_posix(std::string& path); TORRENT_EXPORT void convert_path_to_posix(std::string& path);

View File

@ -473,7 +473,7 @@ namespace libtorrent
} }
std::string url_has_argument( std::string url_has_argument(
std::string const& url, std::string argument, int* out_pos) std::string const& url, std::string argument, std::string::size_type* out_pos)
{ {
size_t i = url.find('?'); size_t i = url.find('?');
if (i == std::string::npos) return std::string(); if (i == std::string::npos) return std::string();

View File

@ -146,7 +146,7 @@ namespace libtorrent
error_code e; error_code e;
std::string display_name = url_has_argument(uri, "dn"); std::string display_name = url_has_argument(uri, "dn");
if (!display_name.empty()) name = unescape_string(display_name.c_str(), e); if (!display_name.empty()) name = unescape_string(display_name.c_str(), e);
int pos = std::string::npos; std::string::size_type pos = std::string::npos;
std::string tracker_string = url_has_argument(uri, "tr", &pos); std::string tracker_string = url_has_argument(uri, "tr", &pos);
if (!tracker_string.empty()) tracker = unescape_string(tracker_string.c_str(), e); if (!tracker_string.empty()) tracker = unescape_string(tracker_string.c_str(), e);