Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "third_party/hunspell/google/bdict_reader.h" | 5 #include "third_party/hunspell/google/bdict_reader.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 | 10 |
| (...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 775 LineIterator BDictReader::GetOtherLineIterator() const { | 775 LineIterator BDictReader::GetOtherLineIterator() const { |
| 776 if (!bdict_data_ || | 776 if (!bdict_data_ || |
| 777 aff_header_->other_offset == 0 || | 777 aff_header_->other_offset == 0 || |
| 778 aff_header_->other_offset >= bdict_length_) | 778 aff_header_->other_offset >= bdict_length_) |
| 779 return LineIterator(bdict_data_, 0, 0); // Item is empty or invalid. | 779 return LineIterator(bdict_data_, 0, 0); // Item is empty or invalid. |
| 780 return LineIterator(bdict_data_, bdict_length_, | 780 return LineIterator(bdict_data_, bdict_length_, |
| 781 aff_header_->other_offset); | 781 aff_header_->other_offset); |
| 782 } | 782 } |
| 783 | 783 |
| 784 ReplacementIterator BDictReader::GetReplacementIterator() const { | 784 ReplacementIterator BDictReader::GetReplacementIterator() const { |
| 785 if (!bdict_data_ || | |
| 786 aff_header_->rep_offset == 0 || | |
| 787 aff_header_->rep_offset >= bdict_length_) | |
| 788 return ReplacementIterator(bdict_data_, 0, 0); // Item is empty or invalid. | |
|
please use gerrit instead
2016/06/21 16:35:44
nit: {}
groby-ooo-7-16
2016/06/21 18:22:40
Keeping it consistent with the rest of the file.
| |
| 785 return ReplacementIterator(bdict_data_, bdict_length_, | 789 return ReplacementIterator(bdict_data_, bdict_length_, |
| 786 aff_header_->rep_offset); | 790 aff_header_->rep_offset); |
| 787 } | 791 } |
| 788 | 792 |
| 789 | 793 |
| 790 WordIterator BDictReader::GetAllWordIterator() const { | 794 WordIterator BDictReader::GetAllWordIterator() const { |
| 791 NodeReader reader(bdict_data_, bdict_length_, header_->dic_offset, 0); | 795 NodeReader reader(bdict_data_, bdict_length_, header_->dic_offset, 0); |
| 792 return WordIterator(reader); | 796 return WordIterator(reader); |
| 793 } | 797 } |
| 794 | 798 |
| 795 } // namespace hunspell | 799 } // namespace hunspell |
| OLD | NEW |