13
0

volatile should not be used to describe non-hardware lvalues, and fix const cast warning (which removes need for mutable)

This commit is contained in:
Paul Davis 2015-06-24 13:09:29 -04:00
parent 5bde11fa98
commit 3392c05779

View File

@ -41,7 +41,7 @@ public:
gint get() const
{
return g_atomic_int_get (&m_value);
return g_atomic_int_get (const_cast<gint*>(&m_value));
}
void set (gint new_value)
@ -90,7 +90,7 @@ public:
private:
// Has to be mutable when using the apple version of gcc.
mutable volatile gint m_value;
gint m_value;
};