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

Unified Diff: runtime/bin/reference_counting.h

Issue 2480793002: clang-format runtime/bin (Closed)
Patch Set: 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/bin/process_win.cc ('k') | runtime/bin/root_certificates_unsupported.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/reference_counting.h
diff --git a/runtime/bin/reference_counting.h b/runtime/bin/reference_counting.h
index 6a6a9e694e0256a2b08a2299579bef06a213f0d4..8721948de4775be8ea49277d6cd5b855e42e7be1 100644
--- a/runtime/bin/reference_counting.h
+++ b/runtime/bin/reference_counting.h
@@ -11,7 +11,8 @@ namespace dart {
namespace bin {
// Forward declaration.
-template <class Target> class RefCntReleaseScope;
+template <class Target>
+class RefCntReleaseScope;
// Inherit from this class where instances of the derived class should be
// reference counted. Reference counts on instances are incremented and
@@ -32,13 +33,9 @@ template <class Target> class RefCntReleaseScope;
template <class Derived>
class ReferenceCounted {
public:
- ReferenceCounted() :
- ref_count_(1) {
- }
+ ReferenceCounted() : ref_count_(1) {}
- ~ReferenceCounted() {
- ASSERT(ref_count_ == 0);
- }
+ ~ReferenceCounted() { ASSERT(ref_count_ == 0); }
void Retain() {
uintptr_t old = AtomicOperations::FetchAndIncrement(&ref_count_);
@@ -78,9 +75,7 @@ class RefCntReleaseScope {
ASSERT(target_ != NULL);
ASSERT(target_->ref_count() > 0);
}
- ~RefCntReleaseScope() {
- target_->Release();
- }
+ ~RefCntReleaseScope() { target_->Release(); }
private:
ReferenceCounted<Target>* target_;
@@ -142,9 +137,7 @@ class RetainedPointer {
}
}
- Target* get() const {
- return static_cast<Target*>(target_);
- }
+ Target* get() const { return static_cast<Target*>(target_); }
private:
ReferenceCounted<Target>* target_;
« no previous file with comments | « runtime/bin/process_win.cc ('k') | runtime/bin/root_certificates_unsupported.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698