Rico Schüller wrote:
Hi,
I only resend a patch because it isn't in the todays git and the author didn't answer for a while.
Cheers Rico
- memcpy(pRect, &This->updateStateBlock->scissorRect, sizeof(pRect));
- memcpy(pRect, &This->updateStateBlock->scissorRect, sizeof(RECT));
To avoid such problems in the future one should use something like:
*pRect = This->updateStateBlock->scissorRect;
Doing a quick search through wined3d I've found number of places with memcpy instead of simple assignment of one struct to another struct. This is a good janitorial task to get rid of memcpy where simple assignment will work.
Vitaliy.
Vitaliy Margolen wrote:
Rico Schüller wrote:
Hi,
I only resend a patch because it isn't in the todays git and the author didn't answer for a while.
Cheers Rico
- memcpy(pRect, &This->updateStateBlock->scissorRect, sizeof(pRect));
- memcpy(pRect, &This->updateStateBlock->scissorRect, sizeof(RECT));
To avoid such problems in the future one should use something like:
*pRect = This->updateStateBlock->scissorRect;
Doing a quick search through wined3d I've found number of places with memcpy instead of simple assignment of one struct to another struct. This is a good janitorial task to get rid of memcpy where simple assignment will work.
Vitaliy.
Is this the reason why this patch isn't excepted? Or is there any other reason?
Cheers Rico
Am Montag, 11. Februar 2008 19:39:27 schrieb Rico Schüller:
Vitaliy Margolen wrote:
Rico Schüller wrote:
Hi,
I only resend a patch because it isn't in the todays git and the author didn't answer for a while.
Cheers Rico
- memcpy(pRect, &This->updateStateBlock->scissorRect, sizeof(pRect));
- memcpy(pRect, &This->updateStateBlock->scissorRect, sizeof(RECT));
To avoid such problems in the future one should use something like:
*pRect = This->updateStateBlock->scissorRect;
Doing a quick search through wined3d I've found number of places with memcpy instead of simple assignment of one struct to another struct. This is a good janitorial task to get rid of memcpy where simple assignment will work.
Vitaliy.
Is this the reason why this patch isn't excepted? Or is there any other reason?
I think because the suggested assignment is prefered over the memcpy that the patch uses