These changes might look useless, since they're not functional.  But:

While debugging it wasn't obvious to me that both branches are manipulating m_w, so I decided to make it more obvious.