mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Added a deleted void* constructor to var, to prevent people accidentally giving it a raw pointer and having it cast to bool
This commit is contained in:
parent
dc3614e9a8
commit
7c2e0edc7e
1 changed files with 3 additions and 1 deletions
|
|
@ -302,7 +302,7 @@ private:
|
|||
int64 int64Value;
|
||||
bool boolValue;
|
||||
double doubleValue;
|
||||
char stringValue [sizeof (String)];
|
||||
char stringValue[sizeof (String)];
|
||||
ReferenceCountedObject* objectValue;
|
||||
MemoryBlock* binaryValue;
|
||||
NativeFunction* methodValue;
|
||||
|
|
@ -319,6 +319,8 @@ private:
|
|||
// This is needed to prevent the wrong constructor/operator being called
|
||||
var (const ReferenceCountedObject*) = delete;
|
||||
var& operator= (const ReferenceCountedObject*) = delete;
|
||||
var (const void*) = delete;
|
||||
var& operator= (const void*) = delete;
|
||||
};
|
||||
|
||||
/** Compares the values of two var objects, using the var::equals() comparison. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue