Some Motif fixes; makefile fixes; added wxTransferStreamToFile/FileToStream for wxWin
streams; fixed wxSP_... ids that clashed with wxTextCtrl; added generic GetPixel implementation for GTK/Motif git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6262 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -473,6 +473,11 @@ int wxDebugContext::debugLevel = 1;
|
||||
bool wxDebugContext::debugOn = TRUE;
|
||||
wxMemStruct *wxDebugContext::checkPoint = NULL;
|
||||
|
||||
// For faster alignment calculation
|
||||
static wxMarkerType markerCalc[2];
|
||||
int wxDebugContext::m_balign = (int)((char *)&markerCalc[1] - (char*)&markerCalc[0]);
|
||||
int wxDebugContext::m_balignmask = (int)((char *)&markerCalc[1] - (char*)&markerCalc[0]) - 1;
|
||||
|
||||
wxDebugContext::wxDebugContext(void)
|
||||
{
|
||||
// m_streamBuf = new wxDebugStreamBuf;
|
||||
@@ -596,6 +601,9 @@ char * wxDebugContext::StartPos (const char * caller)
|
||||
|
||||
I don't know how portable this stuff is, but it seems to work for me at
|
||||
the moment. It would be real nice if I knew more about this!
|
||||
|
||||
// Note: this function is now obsolete (along with CalcAlignment)
|
||||
// because the calculations are done statically, for greater speed.
|
||||
*/
|
||||
size_t wxDebugContext::GetPadding (const size_t size)
|
||||
{
|
||||
@@ -603,11 +611,22 @@ size_t wxDebugContext::GetPadding (const size_t size)
|
||||
return (pad) ? sizeof(wxMarkerType) - pad : 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
size_t wxDebugContext::PaddedSize (const size_t size)
|
||||
{
|
||||
// Added by Terry Farnham <TJRT@pacbell.net> to replace
|
||||
// slow GetPadding call.
|
||||
int padb;
|
||||
|
||||
padb = size & m_balignmask;
|
||||
if(padb)
|
||||
return(size + m_balign - padb);
|
||||
else
|
||||
return(size);
|
||||
|
||||
// Old (slow) code
|
||||
#if 0
|
||||
return size + GetPadding (size);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user