Skip to content

Commit

Permalink
- removed explicit self null tests from dynarray native wrappers
Browse files Browse the repository at this point in the history
They are useless since d3e6ed3 in which generation of implicit self null pointer check was added to JIT
  • Loading branch information
alexey-lysiuk committed Jun 9, 2019
1 parent 324a720 commit d27a7cd
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/scripting/backend/dynarrays.cpp
Expand Up @@ -783,7 +783,6 @@ DEFINE_ACTION_FUNCTION_NATIVE(FDynArray_Obj, Find, ArrayFind<FDynArray_Obj COMMA

int ObjArrayPush(FDynArray_Obj *self, DObject *obj)
{
if (self == nullptr) NullParam("\"self\"");
GC::WriteBarrier(obj);
return self->Push(obj);
}
Expand Down Expand Up @@ -812,7 +811,6 @@ DEFINE_ACTION_FUNCTION_NATIVE(FDynArray_Obj, Delete, ArrayDelete<FDynArray_Obj>)

void ObjArrayInsert(FDynArray_Obj *self,int index, DObject *obj)
{
if (self == nullptr) NullParam("\"self\"");
GC::WriteBarrier(obj);
self->Insert(index, obj);
}
Expand Down

2 comments on commit d27a7cd

@drfrag666
Copy link
Contributor

@drfrag666 drfrag666 commented on d27a7cd Jun 10, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about removing the Nullparam "function" itself? It's unused right now.

@alexey-lysiuk
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.