>Martin Sebor wrote: > >While poring through it though, I noticed a reinterpret cast in >a call to operator delete() further down that was introduced in >the original patch: > http://svn.apache.org/viewvc?view=rev&revision=587215 >I don't think that cast is necessary anymore, since we're not >invoking the delete expression but calling operator delete >directly (and it doesn't call the dtor on the object). > >I think we can safely remove the cast. Here's the patch I plan >to commit unless someone speaks up against it in the next couple >of hours: > >Index: src/time_put.cpp >=================================================================== >--- src/time_put.cpp (revision 630253) >+++ src/time_put.cpp (working copy) >@@ -615,7 +615,7 @@ > _RWSTD_STATIC_CAST(char*, ::operator new (tmpsize)); > memcpy (tmp, pun, sizeof *pun + off); > >- ::operator delete (_RWSTD_REINTERPRET_CAST (char*, pun)); >+ ::operator delete (pun); > > pun = _RWSTD_REINTERPRET_CAST (__rw_time_t*, tmp); > pmem = _RWSTD_REINTERPRET_CAST >(_RWSTD_UINT32_T*, pun); > >Martin >
Yup, the new guy messed up again. I can't imagine why I left the cast, I know that it isn't necessary. Your patch looks good though.
