Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(305)

Unified Diff: base/file_path.cc

Issue 6609008: Change other usages of .size() to .empty() when applicable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Peter nits Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/command_line_unittest.cc ('k') | base/process_util_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/file_path.cc
diff --git a/base/file_path.cc b/base/file_path.cc
index 32217f2bc38abf8d4f339d4fb00dcfd454055ce1..29ec7a8044df88c405f237c215b0437961559518 100644
--- a/base/file_path.cc
+++ b/base/file_path.cc
@@ -249,9 +249,8 @@ bool FilePath::AppendRelativePath(const FilePath& child,
GetComponents(&parent_components);
child.GetComponents(&child_components);
- if (parent_components.size() >= child_components.size())
- return false;
- if (parent_components.empty())
+ if (parent_components.empty() ||
+ parent_components.size() >= child_components.size())
return false;
std::vector<StringType>::const_iterator parent_comp =
« no previous file with comments | « base/command_line_unittest.cc ('k') | base/process_util_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698