Fix error: taking address of temporary [-fpermissive]