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

Unified Diff: remoting/base/typed_buffer.h

Issue 1542203002: Switch to standard integer types in remoting/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@int-remoting-host
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 | « remoting/base/socket_reader.h ('k') | remoting/base/url_request_context_getter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/base/typed_buffer.h
diff --git a/remoting/base/typed_buffer.h b/remoting/base/typed_buffer.h
index fd46646bad110f4509224d8e04841385acd16314..90239f07ffbdd15da524ec1fba0bf874bd0db7d5 100644
--- a/remoting/base/typed_buffer.h
+++ b/remoting/base/typed_buffer.h
@@ -6,10 +6,10 @@
#define REMOTING_BASE_TYPED_BUFFER_H_
#include <assert.h>
+#include <stdint.h>
#include <algorithm>
-#include "base/basictypes.h"
#include "base/logging.h"
#include "base/move.h"
@@ -27,16 +27,16 @@ class TypedBuffer {
TypedBuffer() : TypedBuffer(0) {}
// Creates an instance of the object allocating a buffer of the given size.
- explicit TypedBuffer(uint32 length) : buffer_(NULL), length_(length) {
+ explicit TypedBuffer(uint32_t length) : buffer_(NULL), length_(length) {
if (length_ > 0)
- buffer_ = reinterpret_cast<T*>(new uint8[length_]);
+ buffer_ = reinterpret_cast<T*>(new uint8_t[length_]);
}
TypedBuffer(TypedBuffer&& rvalue) : TypedBuffer() { Swap(rvalue); }
~TypedBuffer() {
if (buffer_) {
- delete[] reinterpret_cast<uint8*>(buffer_);
+ delete[] reinterpret_cast<uint8_t*>(buffer_);
buffer_ = NULL;
}
}
@@ -58,12 +58,12 @@ class TypedBuffer {
}
T* get() const { return buffer_; }
- uint32 length() const { return length_; }
+ uint32_t length() const { return length_; }
// Helper returning a pointer to the structure starting at a specified byte
// offset.
- T* GetAtOffset(uint32 offset) {
- return reinterpret_cast<T*>(reinterpret_cast<uint8*>(buffer_) + offset);
+ T* GetAtOffset(uint32_t offset) {
+ return reinterpret_cast<T*>(reinterpret_cast<uint8_t*>(buffer_) + offset);
}
// Allow TypedBuffer<T> to be used in boolean expressions, but not
@@ -82,7 +82,7 @@ class TypedBuffer {
T* buffer_;
// Length of the owned buffer in bytes.
- uint32 length_;
+ uint32_t length_;
};
} // namespace remoting
« no previous file with comments | « remoting/base/socket_reader.h ('k') | remoting/base/url_request_context_getter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698