I don't have the first idea why the MSVC compiler didn't like the
following:

    DELETEP((UT_UCSChar *)pHE->pData);

   So if anybody can explain to me why this is any different:

    UT_UCSChar * pData = (UT_UCSChar *)pHE->pData;
    DELETEPV(pData);

   (other than DELETEP vs. DELETEPV, of course), I'd be happy to know (it
may just be that I don't understand code at 9AM, so feel free to call me
stupid).

   As for DELETEP vs. DELETEPV - I believe that what pHE->pData points to
is allocated at line 87 of xad_Document.cpp, like so:

    UT_UCSChar *copy = new UT_UCSChar[len + 1];

   and my limited knowledge of DELETEP vs. DELETEPV leads me to believe
that we want to use the latter, not the former.  Please correct me if I'm
wrong (cuz once again, it may just be too early for intelligent thought).

   -Tom



1. Removed an unused variable
2. Rewrote what appeared to be perfectly good code to appease the MSVC
compiler
CVS: ----------------------------------------------------------------------
CVS: Enter Log.  Lines beginning with `CVS:' are removed automatically
CVS:
CVS: Committing in .
CVS:
CVS: Modified Files:
CVS:    src/af/xap/xp/xad_Document.cpp
CVS: ----------------------------------------------------------------------


Reply via email to