Bug 726894. Add a copy constructor to DebugOnly so it can be used in more situations. r=cjones

This commit is contained in:
Robert O'Callahan 2012-02-14 17:39:20 +13:00
parent eac2102182
commit 9371edde80

View File

@ -78,6 +78,7 @@ struct DebugOnly
DebugOnly() {}
DebugOnly(const T& other) : value(other) {}
DebugOnly(const DebugOnly& other) : value(other.value) {}
DebugOnly& operator=(const T& rhs) {
value = rhs;
return *this;
@ -97,6 +98,7 @@ struct DebugOnly
#else
DebugOnly() {}
DebugOnly(const T&) {}
DebugOnly(const DebugOnly&) {}
DebugOnly& operator=(const T&) { return *this; }
void operator++(int) {}
void operator--(int) {}