diff options
author | ted.mielczarek@gmail.com <ted.mielczarek@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2013-03-06 14:04:42 +0000 |
---|---|---|
committer | ted.mielczarek@gmail.com <ted.mielczarek@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2013-03-06 14:04:42 +0000 |
commit | aeffe1056f9ff6526d87a16ef55222899f5528f7 (patch) | |
tree | 1b7601a9135f82c14e73535c9d4a24f94d494662 /src/processor/static_map-inl.h | |
parent | Work around Windows headers #defining ERROR by renaming enum values in StackF... (diff) | |
download | breakpad-aeffe1056f9ff6526d87a16ef55222899f5528f7.tar.xz |
Use stdint types everywhere
R=mark at https://breakpad.appspot.com/535002/
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1121 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/processor/static_map-inl.h')
-rw-r--r-- | src/processor/static_map-inl.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/processor/static_map-inl.h b/src/processor/static_map-inl.h index 7727052f..e6aac6ab 100644 --- a/src/processor/static_map-inl.h +++ b/src/processor/static_map-inl.h @@ -47,13 +47,13 @@ StaticMap<Key, Value, Compare>::StaticMap(const char* raw_data) : raw_data_(raw_data), compare_() { // First 4 Bytes store the number of nodes. - num_nodes_ = *(reinterpret_cast<const u_int32_t*>(raw_data_)); + num_nodes_ = *(reinterpret_cast<const uint32_t*>(raw_data_)); - offsets_ = reinterpret_cast<const u_int32_t*>( + offsets_ = reinterpret_cast<const uint32_t*>( raw_data_ + sizeof(num_nodes_)); keys_ = reinterpret_cast<const Key*>( - raw_data_ + (1 + num_nodes_) * sizeof(u_int32_t)); + raw_data_ + (1 + num_nodes_) * sizeof(uint32_t)); } // find(), lower_bound() and upper_bound() implement binary search algorithm. @@ -132,14 +132,14 @@ bool StaticMap<Key, Value, Compare>::ValidateInMemoryStructure() const { int node_index = 0; if (num_nodes_) { - u_int64_t first_offset = sizeof(int32_t) * (num_nodes_ + 1) + uint64_t first_offset = sizeof(int32_t) * (num_nodes_ + 1) + sizeof(Key) * num_nodes_; // Num_nodes_ is too large. if (first_offset > 0xffffffffUL) { BPLOG(INFO) << "StaticMap check failed: size exceeds limit"; return false; } - if (offsets_[node_index] != static_cast<u_int32_t>(first_offset)) { + if (offsets_[node_index] != static_cast<uint32_t>(first_offset)) { BPLOG(INFO) << "StaticMap check failed: first node offset is incorrect"; return false; } |