mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Added a private constructor to Value that should prevent accidentally creating one from an int=0
This commit is contained in:
parent
fccca2eff7
commit
edfb1e9830
2 changed files with 5 additions and 7 deletions
|
|
@ -111,12 +111,6 @@ Value::Value (const Value& other) : value (other.value)
|
|||
{
|
||||
}
|
||||
|
||||
Value& Value::operator= (const Value& other)
|
||||
{
|
||||
value = other.value;
|
||||
return *this;
|
||||
}
|
||||
|
||||
#if JUCE_COMPILER_SUPPORTS_MOVE_SEMANTICS
|
||||
Value::Value (Value&& other) noexcept
|
||||
{
|
||||
|
|
|
|||
|
|
@ -221,7 +221,11 @@ private:
|
|||
|
||||
// This is disallowed to avoid confusion about whether it should
|
||||
// do a by-value or by-reference copy.
|
||||
Value& operator= (const Value&);
|
||||
Value& operator= (const Value&) JUCE_DELETED_FUNCTION;
|
||||
|
||||
// This declaration prevents accidental construction from an integer of 0,
|
||||
// which is possible in some compilers via an implicit cast to a pointer.
|
||||
Value (void*) JUCE_DELETED_FUNCTION;
|
||||
};
|
||||
|
||||
/** Writes a Value to an OutputStream as a UTF8 string. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue