Re: [Libreoffice] [patch] memset used on struc with std::vector / Windows code
Hi Pierre-André, On Sunday, 2011-09-11 14:20:57 +0200, Pierre-André Jacquod wrote: > the struct DdeInstData contains a std::vector, but was initialized > with memset( pData,0,sizeof(DdeInstData) ) Good catch. > So I tried to have a consistent initialization with the new struct layout. That should happen in a DdeInstData ctor instead. Note that you don't need to explicitly clear the vector on that newly allocated object, it is created empty anyway. Eike -- PGP/OpenPGP/GnuPG encrypted mail preferred in all private communication. Key ID: 0x293C05FD - 997A 4C60 CE41 0149 0DB3 9E96 2F1A D073 293C 05FD signature.asc Description: Digital signature ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice] [patch] memset used on struc with std::vector / Windows code
hello, I allow me to send also this patch (I should really find out a Windows box in order to compile / test by myself). In short: since a39d4eae Remove DECLARE_LIST(DdeConnections,DdeConnection*) the struct DdeInstData contains a std::vector, but was initialized with memset( pData,0,sizeof(DdeInstData) ) So I tried to have a consistent initialization with the new struct layout. regards Pierre-André 0007-wrong-initialization-of-DdeInstData-with-memset-desp.patch Description: application/mbox ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice