[Libreoffice] [PUSHED][patch] memset used on struc with std::vector / Windows code

2011-09-13 Thread Caolán McNamara
On Sun, 2011-09-11 at 15:48 +0200, Eike Rathke wrote:
 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.

Yup, great catch. Thanks for this, pushed now.

 That should happen in a DdeInstData ctor instead.

I've moved it into the ctor now.

C.

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [PUSHED][patch] memset used on struc with std::vector / Windows code

2011-09-13 Thread Pierre-André Jacquod

Hello,


That should happen in a DdeInstData ctor instead.


I intended to do something easier:
struct DdeInstData
{
short x;

DdeInstData(); // and of course implementing this
}


I've moved it into the ctor now.


Thanks, I was not able to react very quickly, making this during free 
time ... and on Linux. Sorry.


Just for my education [answer is optional]:

The fact to change to class and use boost::noncopyable is an improvement 
not related to this point I guess, since before the copy-ctor and copy 
assignment would have worked with the struct.


Or did I missed something?

Thanks.

regards
Pierre-André
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice