Skip to content
Permalink
Browse files

- removed explicit self null tests from dynarray native wrappers

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 d27a7cd84b571fc77a677b67f248dbde2aedc1eb
Showing with 0 additions and 2 deletions.
  1. +0 −2 src/scripting/backend/dynarrays.cpp
@@ -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);
}
@@ -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);
}

2 comments on commit d27a7cd

@drfrag666

This comment has been minimized.

Copy link
Contributor

replied Jun 10, 2019

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

@alexey-lysiuk

This comment has been minimized.

Copy link
Collaborator Author

replied Jun 10, 2019

#define PARAM_NULLCHECK(ptr, var) (ptr == nullptr? NullParam(#var), ptr : ptr)

Please sign in to comment.
You can’t perform that action at this time.