Chromium Code Reviews| Index: base/files/file_path_watcher_linux.cc |
| diff --git a/base/files/file_path_watcher_linux.cc b/base/files/file_path_watcher_linux.cc |
| index 205a3eb779fbff1127a5c71657d86fa05130447a..d77b0392fc5c7999b9c6f94c22824a2834447859 100644 |
| --- a/base/files/file_path_watcher_linux.cc |
| +++ b/base/files/file_path_watcher_linux.cc |
| @@ -373,10 +373,10 @@ bool FilePathWatcherImpl::Watch(const FilePath& path, |
| std::vector<FilePath::StringType> comps; |
| target_.GetComponents(&comps); |
| DCHECK(!comps.empty()); |
| - for (std::vector<FilePath::StringType>::const_iterator comp(++comps.begin()); |
|
jar (doing other things)
2012/08/30 02:47:25
I didn't especially like this pre-increment on the
yongsheng
2012/08/30 04:50:17
yes, see the compiler error on Android.
|
| - comp != comps.end(); ++comp) { |
| + std::vector<FilePath::StringType>::const_iterator comp = comps.begin(); |
|
Mark Mentovai
2012/08/30 02:50:42
Why are you changing this?
yongsheng
2012/08/30 03:06:30
The fix for file_path_watcher_linux.cc is because
|
| + for (++comp; comp != comps.end(); ++comp) |
| watches_.push_back(WatchEntry(InotifyReader::kInvalidWatch, *comp)); |
| - } |
| + |
| watches_.push_back(WatchEntry(InotifyReader::kInvalidWatch, |
| FilePath::StringType())); |
| return UpdateWatches(); |