For each class where you find a memset
call, add a memset
member function which ignores the pointer and size arguments and does assignments to all the data members.
edit:
Actually, it shouldn’t ignore the pointer, it should compare it to this
. On a match, do the right thing for the object, on a mismatch, reroute to the global function.