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

Unified Diff: include/private/SkSpinlock.h

Issue 1936653002: Add reminders that these classes have constexpr default constructors. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 months 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 | « include/private/SkOnce.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/private/SkSpinlock.h
diff --git a/include/private/SkSpinlock.h b/include/private/SkSpinlock.h
index 27442068717b319f6bd56cda1fc327150b71f057..a5d378289ffa1eb47dbd142b07df58f491c6f136 100644
--- a/include/private/SkSpinlock.h
+++ b/include/private/SkSpinlock.h
@@ -13,6 +13,8 @@
class SkSpinlock {
public:
+ constexpr SkSpinlock() = default;
+
void acquire() {
// To act as a mutex, we need an acquire barrier when we acquire the lock.
if (fLocked.exchange(true, std::memory_order_acquire)) {
« no previous file with comments | « include/private/SkOnce.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698