X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/907789a0f72354f30ec04f79f03a0b7e2a29ac9a..93d2bf4406e5f850189f827275c66ef99bb64791:/src/common/serbase.cpp diff --git a/src/common/serbase.cpp b/src/common/serbase.cpp index 1f2ea96f9c..6b89bea73d 100644 --- a/src/common/serbase.cpp +++ b/src/common/serbase.cpp @@ -15,6 +15,9 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" +#if defined(__WINDOWS__) +#include "wx/msw/private.h" +#endif #include "wx/serbase.h" #include "wx/datstrm.h" @@ -24,15 +27,16 @@ #pragma hdrstop #endif +#if wxUSE_SERIAL + // ---------------------------------------------------------------------------- // wxObject_Serialize // ---------------------------------------------------------------------------- -#if !USE_SHARED_LIBRARY IMPLEMENT_DYNAMIC_CLASS(wxObject_Serialize,wxObject) + IMPLEMENT_SERIAL_CLASS(wxList, wxObject) IMPLEMENT_SERIAL_CLASS(wxHashTable, wxObject) -#endif void WXSERIAL(wxList)::StoreObject(wxObjectOutputStream& s) { @@ -55,7 +59,7 @@ void WXSERIAL(wxList)::StoreObject(wxObjectOutputStream& s) if (lst_object->GetKeyType() == wxKEY_INTEGER) { while (node) { - data_s.Write32(node->GetKeyInteger()); + data_s.Write32((size_t)node->GetKeyInteger()); node = node->Next(); } } else { @@ -72,7 +76,7 @@ void WXSERIAL(wxList)::LoadObject(wxObjectInputStream& s) wxList *list = (wxList *)Object(); int number, i; - list->DeleteContents( data_s.Read8() ); + list->DeleteContents( data_s.Read8() != 0 ); list->SetKeyType( (wxKeyType) data_s.Read8() ); number = data_s.Read32(); @@ -118,3 +122,5 @@ void WXSERIAL(wxHashTable)::LoadObject(wxObjectInputStream& s) for (i=0;ihash_table[i] = (wxList *)s.GetChild(); } + +#endif // wxUSE_SERIAL