autoPtr/tmp cleanup
Mostly style (declutter) changes for autoPtr/tmp. The valid()
and empty()
methods tended to result (IMO) dense, hard to read code. Worst case example is an autoPtr wrapping of a tmp:
if (data.valid() && data().valid())
Which is somewhat easier to read with direct testing of the pointer, and a pointer deference:
if (data && data->valid())
Other cases of opaque code arise from the empty()
with a negation:
if (!ptr.empty()) ... can use the pointer
instead of simply
if (ptr) ... can use the pointer
Removed some pre-nullObject (2014) code remnants from the tmp logic.
Edited by Mark OLESEN