Avoid unnecessary allocation of temporary object