Why using the pointer like that?

Line: 267 In the Prs3d_Presentation.cxx
Handle(Graphic3d_Group) Prs3d_Presentation::CurrentGroup () const
{
if(myCurrentGroup.IsNull()){
void *ptr = (void*) this;
Prs3d_Presentation* p = (Prs3d_Presentation *)ptr;
p->NewGroup();
}
return myCurrentGroup;
}

Could I replace
void *ptr = (void*) this;
Prs3d_Presentation* p = (Prs3d_Presentation *)ptr;
p->NewGroup();
with
NewGroup();
directly?
Why using the pointer like that?

ziyoo's picture

Is there really nobody who knows why to use the pointer like that?

Thank you in advance for any help!!

ziyoo

ziyoo's picture

Who can tell me why?
Thanks in advance for any hint