diff options
author | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-04 21:03:47 +0000 |
---|---|---|
committer | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-04 21:03:47 +0000 |
commit | 6775e40aeb887f15dc9182b250cdc4100aa79ce0 (patch) | |
tree | 858e3064689861a9ad85975154ce653418aaf3d8 /base/file_path.cc | |
parent | 5bd8d1716b3f27664348c7fcb2c33f2e3a4573a7 (diff) | |
download | chromium_src-6775e40aeb887f15dc9182b250cdc4100aa79ce0.zip chromium_src-6775e40aeb887f15dc9182b250cdc4100aa79ce0.tar.gz chromium_src-6775e40aeb887f15dc9182b250cdc4100aa79ce0.tar.bz2 |
Change other usages of .size() to .empty() when applicable.
BUG=carnitas
TEST=compiles
Review URL: http://codereview.chromium.org/6609008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76962 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/file_path.cc')
-rw-r--r-- | base/file_path.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/base/file_path.cc b/base/file_path.cc index 32217f2..29ec7a80 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 = |