diff options
author | avi <avi@chromium.org> | 2015-12-21 11:35:33 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-21 19:36:50 +0000 |
commit | ab98dcc986f5a27e972dad1735fe089154186cd9 (patch) | |
tree | c706077d103f0d77a1f1f5b1bd9c4712627bd195 /courgette/region.h | |
parent | 343184883aee8ba06d9ed3244c4adf63577d030c (diff) | |
download | chromium_src-ab98dcc986f5a27e972dad1735fe089154186cd9.zip chromium_src-ab98dcc986f5a27e972dad1735fe089154186cd9.tar.gz chromium_src-ab98dcc986f5a27e972dad1735fe089154186cd9.tar.bz2 |
Switch to standard integer types in courgette/.
BUG=138542
TBR=wfh@chromium.org
NOPRESUBMIT=true
Review URL: https://codereview.chromium.org/1543643002
Cr-Commit-Position: refs/heads/master@{#366439}
Diffstat (limited to 'courgette/region.h')
-rw-r--r-- | courgette/region.h | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/courgette/region.h b/courgette/region.h index 4aafbca..b0100cf 100644 --- a/courgette/region.h +++ b/courgette/region.h @@ -5,9 +5,11 @@ #ifndef COURGETTE_REGION_H_ #define COURGETTE_REGION_H_ +#include <stddef.h> +#include <stdint.h> + #include <string> -#include "base/basictypes.h" namespace courgette { @@ -21,16 +23,13 @@ class Region { // Usual constructor for regions given a |start| address and |length|. Region(const void* start, size_t length) - : start_(static_cast<const uint8*>(start)), - length_(length) { - } + : start_(static_cast<const uint8_t*>(start)), length_(length) {} // String constructor. Region is owned by the string, so the string should // have a lifetime greater than the region. explicit Region(const std::string& string) - : start_(reinterpret_cast<const uint8*>(string.c_str())), - length_(string.length()) { - } + : start_(reinterpret_cast<const uint8_t*>(string.c_str())), + length_(string.length()) {} // Copy constructor. Region(const Region& other) : start_(other.start_), length_(other.length_) {} @@ -43,16 +42,16 @@ class Region { } // Returns the starting address of the region. - const uint8* start() const { return start_; } + const uint8_t* start() const { return start_; } // Returns the length of the region. size_t length() const { return length_; } // Returns the address after the last byte of the region. - const uint8* end() const { return start_ + length_; } + const uint8_t* end() const { return start_ + length_; } private: - const uint8* start_; + const uint8_t* start_; size_t length_; void operator=(const Region&); // Disallow assignment operator. |