OW warning fix. Our compile time asserts warns when used within function and dedicated #pragma seems not influence it so they are moved from functions into global space as near as possible.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30009 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -113,16 +113,16 @@ public:
|
||||
m_pItem = &item;
|
||||
}
|
||||
|
||||
// memcpy() in Init() can't work if the struct sizes are different
|
||||
wxCOMPILE_TIME_ASSERT( sizeof(LV_ITEM_OTHER) == sizeof(LV_ITEM_NATIVE),
|
||||
CodeCantWorkIfDiffSizes);
|
||||
|
||||
// init with conversion
|
||||
void Init(LV_ITEM_OTHER& item)
|
||||
{
|
||||
// avoid unnecessary dynamic memory allocation, jjust make m_pItem
|
||||
// point to our own m_item
|
||||
|
||||
// memcpy() can't work if the struct sizes are different
|
||||
wxCOMPILE_TIME_ASSERT( sizeof(LV_ITEM_OTHER) == sizeof(LV_ITEM_NATIVE),
|
||||
CodeCantWorkIfDiffSizes);
|
||||
|
||||
memcpy(&m_item, &item, sizeof(LV_ITEM_NATIVE));
|
||||
|
||||
// convert text from ANSI to Unicod if necessary
|
||||
|
Reference in New Issue
Block a user