| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_writer.h" | 5 #include "third_party/hunspell/google/bdict_writer.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
| 9 #include "third_party/hunspell/google/bdict.h" | 9 #include "third_party/hunspell/google/bdict.h" |
| 10 | 10 |
| 11 namespace hunspell { | 11 namespace hunspell { |
| 12 | 12 |
| 13 // Represents one node the word trie in memory. This does not have to be very | 13 // Represents one node the word trie in memory. This does not have to be very |
| 14 // efficient since it is only used when building. | 14 // efficient since it is only used when building. |
| 15 class DicNode { | 15 class DicNode { |
| 16 public: | 16 public: |
| 17 enum StorageType { | 17 enum StorageType { |
| 18 UNDEFINED, // Uninitialized storage type. | 18 UNDEFINED, // Uninitialized storage type. |
| (...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 503 // Add the header now that we know the offsets. | 503 // Add the header now that we know the offsets. |
| 504 hunspell::BDict::AffHeader* header = | 504 hunspell::BDict::AffHeader* header = |
| 505 reinterpret_cast<hunspell::BDict::AffHeader*>(&(*output)[header_offset]); | 505 reinterpret_cast<hunspell::BDict::AffHeader*>(&(*output)[header_offset]); |
| 506 header->affix_group_offset = static_cast<uint32>(affix_group_offset); | 506 header->affix_group_offset = static_cast<uint32>(affix_group_offset); |
| 507 header->affix_rule_offset = static_cast<uint32>(affix_rule_offset); | 507 header->affix_rule_offset = static_cast<uint32>(affix_rule_offset); |
| 508 header->rep_offset = static_cast<uint32>(rep_offset); | 508 header->rep_offset = static_cast<uint32>(rep_offset); |
| 509 header->other_offset = static_cast<uint32>(other_offset); | 509 header->other_offset = static_cast<uint32>(other_offset); |
| 510 } | 510 } |
| 511 | 511 |
| 512 } // namespace hunspell | 512 } // namespace hunspell |
| OLD | NEW |