Skip to content

Commit 15c8931

Browse files
committed
server: Update alt.Player.all getter to use macros
Former-commit-id: b94afc9
1 parent 7895eee commit 15c8931

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

server/src/bindings/Player.cpp

+2-5
Original file line numberDiff line numberDiff line change
@@ -375,12 +375,9 @@ static void SetIntoVehicle(const v8::FunctionCallbackInfo<v8::Value>& info)
375375

376376
static void AllGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
377377
{
378-
v8::Isolate* isolate = info.GetIsolate();
379-
380-
V8ResourceImpl* resource = V8ResourceImpl::Get(isolate->GetEnteredContext());
381-
V8_CHECK(resource, "invalid resource");
378+
V8_GET_ISOLATE_CONTEXT_RESOURCE();
382379

383-
info.GetReturnValue().Set(resource->GetAllPlayers());
380+
V8_RETURN(resource->GetAllPlayers());
384381
}
385382

386383
static void StaticGetByID(const v8::FunctionCallbackInfo<v8::Value>& info)

0 commit comments

Comments
 (0)