Commit 3d46dad1 authored by xiaofeng@google.com's avatar xiaofeng@google.com

Use string::size_type instead of int for results of string.find() etc. -- patch from hans

parent fcb8a50b
...@@ -926,7 +926,7 @@ CommandLineInterface::InterpretArgument(const string& name, ...@@ -926,7 +926,7 @@ CommandLineInterface::InterpretArgument(const string& name,
string virtual_path; string virtual_path;
string disk_path; string disk_path;
int equals_pos = parts[i].find_first_of('='); string::size_type equals_pos = parts[i].find_first_of('=');
if (equals_pos == string::npos) { if (equals_pos == string::npos) {
virtual_path = ""; virtual_path = "";
disk_path = parts[i]; disk_path = parts[i];
......
...@@ -2673,7 +2673,7 @@ Symbol DescriptorBuilder::LookupSymbolNoPlaceholder( ...@@ -2673,7 +2673,7 @@ Symbol DescriptorBuilder::LookupSymbolNoPlaceholder(
// } // }
// So, we look for just "Foo" first, then look for "Bar.baz" within it if // So, we look for just "Foo" first, then look for "Bar.baz" within it if
// found. // found.
int name_dot_pos = name.find_first_of('.'); string::size_type name_dot_pos = name.find_first_of('.');
string first_part_of_name; string first_part_of_name;
if (name_dot_pos == string::npos) { if (name_dot_pos == string::npos) {
first_part_of_name = name; first_part_of_name = name;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment