Don't create special objects for NULL, just use NULL directly.
Also move null check into PycRef for nullable references.
This commit is contained in:
@@ -35,7 +35,7 @@ void PycLong::load(PycData* stream, PycModule*)
|
||||
|
||||
bool PycLong::isEqual(PycRef<PycObject> obj) const
|
||||
{
|
||||
if (type() != obj->type())
|
||||
if (type() != obj.type())
|
||||
return false;
|
||||
|
||||
PycRef<PycLong> longObj = obj.cast<PycLong>();
|
||||
@@ -110,7 +110,7 @@ void PycFloat::load(PycData* stream, PycModule*)
|
||||
|
||||
bool PycFloat::isEqual(PycRef<PycObject> obj) const
|
||||
{
|
||||
if (type() != obj->type())
|
||||
if (type() != obj.type())
|
||||
return false;
|
||||
|
||||
PycRef<PycFloat> floatObj = obj.cast<PycFloat>();
|
||||
|
Reference in New Issue
Block a user