Fix type conversion compile error (issue #1397).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1860 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
parent
77aa0be191
commit
02c3655ddb
|
@ -1276,9 +1276,9 @@ std::string GetMultiNavURL(const std::string& origin, int nav) {
|
||||||
|
|
||||||
// Extract the nav number from the URL.
|
// Extract the nav number from the URL.
|
||||||
int GetNavFromMultiNavURL(const std::string& url) {
|
int GetNavFromMultiNavURL(const std::string& url) {
|
||||||
const int start = url.find("/nav");
|
const size_t start = url.find("/nav");
|
||||||
const int end = url.find(".html", start);
|
const size_t end = url.find(".html", start);
|
||||||
EXPECT_TRUE(start < end && start > 0);
|
EXPECT_TRUE(start < end && start > 0U);
|
||||||
const std::string& nav = url.substr(start + 4, end - start - 4);
|
const std::string& nav = url.substr(start + 4, end - start - 4);
|
||||||
return atoi(nav.c_str());
|
return atoi(nav.c_str());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue