C++ client implementation for views

This is the function is wasn't sure about. Is it bad practice to return something by value and modify a pointer given as a paramter at the same time?