Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(31)

Unified Diff: src/common/memory_range.h

Issue 535002: Use stdint types everywhere. (Closed)
Patch Set: Renamed uint128_t to uint128_struct Created 12 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/common/memory_range.h
===================================================================
--- a/src/common/memory_range.h
+++ b/src/common/memory_range.h
@@ -62,17 +62,17 @@ class MemoryRange {
// Resets to an empty range.
void Reset() {
data_ = NULL;
length_ = 0;
}
// Sets this memory range to point to |data| and its length to |length|.
void Set(const void* data, size_t length) {
- data_ = reinterpret_cast<const u_int8_t*>(data);
+ data_ = reinterpret_cast<const uint8_t*>(data);
// Always set |length_| to zero if |data_| is NULL.
length_ = data ? length : 0;
}
// Returns true if this range covers a subrange of |sub_length| bytes
// at |sub_offset| bytes of this memory range, or false otherwise.
bool Covers(size_t sub_offset, size_t sub_length) const {
// The following checks verify that:
@@ -122,24 +122,24 @@ class MemoryRange {
// Returns a subrange of |sub_length| bytes at |sub_offset| bytes of
// this memory range, or an empty range if the subrange is out of bounds.
MemoryRange Subrange(size_t sub_offset, size_t sub_length) const {
return Covers(sub_offset, sub_length) ?
MemoryRange(data_ + sub_offset, sub_length) : MemoryRange();
}
// Returns a pointer to the beginning of this memory range.
- const u_int8_t* data() const { return data_; }
+ const uint8_t* data() const { return data_; }
// Returns the length, in bytes, of this memory range.
size_t length() const { return length_; }
private:
// Pointer to the beginning of this memory range.
- const u_int8_t* data_;
+ const uint8_t* data_;
// Length, in bytes, of this memory range.
size_t length_;
};
} // namespace google_breakpad
#endif // COMMON_MEMORY_RANGE_H_

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld 1004:630ec63f810e-tainted