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

Unified Diff: runtime/vm/memory_region.h

Issue 2481873005: clang-format runtime/vm (Closed)
Patch Set: Merge Created 4 years, 1 month 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 | « runtime/vm/megamorphic_cache_table.cc ('k') | runtime/vm/memory_region.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/memory_region.h
diff --git a/runtime/vm/memory_region.h b/runtime/vm/memory_region.h
index 807588bc42eb303e2883b894a585bfd58c184fc7..2b1763a51721462fe9d9961851cc14db88301744 100644
--- a/runtime/vm/memory_region.h
+++ b/runtime/vm/memory_region.h
@@ -16,8 +16,8 @@ namespace dart {
// of the region.
class MemoryRegion : public ValueObject {
public:
- MemoryRegion() : pointer_(NULL), size_(0) { }
- MemoryRegion(void* pointer, uword size) : pointer_(pointer), size_(size) { }
+ MemoryRegion() : pointer_(NULL), size_(0) {}
+ MemoryRegion(void* pointer, uword size) : pointer_(pointer), size_(size) {}
MemoryRegion(const MemoryRegion& other) : ValueObject() { *this = other; }
MemoryRegion& operator=(const MemoryRegion& other) {
pointer_ = other.pointer_;
@@ -34,15 +34,18 @@ class MemoryRegion : public ValueObject {
uword start() const { return reinterpret_cast<uword>(pointer_); }
uword end() const { return start() + size_; }
- template<typename T> T Load(uword offset) const {
+ template <typename T>
+ T Load(uword offset) const {
return *ComputeInternalPointer<T>(offset);
}
- template<typename T> void Store(uword offset, T value) const {
+ template <typename T>
+ void Store(uword offset, T value) const {
*ComputeInternalPointer<T>(offset) = value;
}
- template<typename T> T* PointerTo(uword offset) const {
+ template <typename T>
+ T* PointerTo(uword offset) const {
return ComputeInternalPointer<T>(offset);
}
@@ -67,7 +70,8 @@ class MemoryRegion : public ValueObject {
}
private:
- template<typename T> T* ComputeInternalPointer(uword offset) const {
+ template <typename T>
+ T* ComputeInternalPointer(uword offset) const {
ASSERT(size() >= sizeof(T));
ASSERT(offset <= size() - sizeof(T));
return reinterpret_cast<T*>(start() + offset);
« no previous file with comments | « runtime/vm/megamorphic_cache_table.cc ('k') | runtime/vm/memory_region.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698