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

Unified Diff: third_party/hunspell/google/bdict_reader.cc

Issue 1547213002: Switch to standard integer types in third_party/hunspell/google/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | « third_party/hunspell/google/bdict_reader.h ('k') | third_party/hunspell/google/bdict_writer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/hunspell/google/bdict_reader.cc
diff --git a/third_party/hunspell/google/bdict_reader.cc b/third_party/hunspell/google/bdict_reader.cc
index ddd3c885ed2cd2916790e4e251c208604ee13379..a70127d44d3982b231dfffb8c3e17f35da1b08e7 100644
--- a/third_party/hunspell/google/bdict_reader.cc
+++ b/third_party/hunspell/google/bdict_reader.cc
@@ -4,6 +4,8 @@
#include "third_party/hunspell/google/bdict_reader.h"
+#include <stdint.h>
+
#include "base/logging.h"
namespace hunspell {
@@ -332,11 +334,11 @@ int NodeReader::FillAffixesForLeafMatch(
// Save the end pointer (accounting for an odd number of bytes).
size_t array_start = node_offset_ + additional_bytes + 2;
- const uint16* const bdict_short_end = reinterpret_cast<const uint16*>(
+ const uint16_t* const bdict_short_end = reinterpret_cast<const uint16_t*>(
&bdict_data_[((bdict_length_ - array_start) & -2) + array_start]);
// Process all remaining matches.
- const uint16* following_array = reinterpret_cast<const uint16*>(
- &bdict_data_[array_start]);
+ const uint16_t* following_array =
+ reinterpret_cast<const uint16_t*>(&bdict_data_[array_start]);
for (int i = 0; i < BDict::MAX_AFFIXES_PER_WORD - list_offset; i++) {
if (&following_array[i] >= bdict_short_end) {
is_valid_ = false;
@@ -722,7 +724,7 @@ bool BDictReader::Init(const unsigned char* bdict_data, size_t bdict_length) {
&bdict_data[header_->aff_offset]);
// Make sure there is enough room for the affix group count dword.
- if (aff_header_->affix_group_offset > bdict_length - sizeof(uint32))
+ if (aff_header_->affix_group_offset > bdict_length - sizeof(uint32_t))
return false;
// This function is called from SpellCheck::SpellCheckWord(), which blocks
« no previous file with comments | « third_party/hunspell/google/bdict_reader.h ('k') | third_party/hunspell/google/bdict_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698