long style = 0);
// empty but ensures that dtor of all derived classes is virtual
- virtual ~wxConfigBase();
+ virtual ~wxConfigBase(){};
// path management
// set current path: if the first character is '/', it's the absolute path,
static void AddAuthority(wxDateTimeHolidayAuthority *auth);
// the base class must have a virtual dtor
- virtual ~wxDateTimeHolidayAuthority();
+ virtual ~wxDateTimeHolidayAuthority(){};
protected:
// this function is called to determine whether a given day is a holiday
{
wxHtmlHelpDataItem() : level(0), parent(NULL), id(wxID_ANY), book(NULL) {}
- short int level;
+ int level;
wxHtmlHelpDataItem *parent;
int id;
wxString name;
wxHtmlContentsItem& operator=(const wxHtmlContentsItem& d);
~wxHtmlContentsItem();
- short int m_Level;
+ int m_Level;
int m_ID;
wxChar *m_Name;
wxChar *m_Page;
long style = wxCONFIG_USE_GLOBAL_FILE);
// dtor will save unsaved data
- virtual ~wxRegConfig();
+ virtual ~wxRegConfig(){};
// implement inherited pure virtual functions
// ------------------------------------------
wxMBConv& conv = wxConvUTF8);
// dtor
- virtual ~wxTextBuffer();
+ virtual ~wxTextBuffer(){};
protected:
// ctors
m_bRecordDefaults = false;
}
-wxConfigBase::~wxConfigBase()
-{
-}
-
wxConfigBase *wxConfigBase::Set(wxConfigBase *pConfig)
{
wxConfigBase *pOld = ms_pConfig;
// yday lies in December then
if ( (mon == Dec) || (yday <= gs_cumulatedDays[isLeap][mon + 1]) )
{
- Set(yday - gs_cumulatedDays[isLeap][mon], mon, year);
+ Set((wxDateTime::wxDateTime_t)(yday - gs_cumulatedDays[isLeap][mon]), mon, year);
break;
}
return (wxChar *)NULL;
}
- wxDateTime_t hour = *p++ - _T('0');
+ wxDateTime_t hour = (wxDateTime_t)(*p++ - _T('0'));
if ( !wxIsdigit(*p) )
{
}
hour *= 10;
- hour += *p++ - _T('0');
+ hour = (wxDateTime_t)(hour + (*p++ - _T('0')));
if ( *p++ != _T(':') )
{
return (wxChar *)NULL;
}
- wxDateTime_t min = *p++ - _T('0');
+ wxDateTime_t min = (wxDateTime_t)(*p++ - _T('0'));
if ( !wxIsdigit(*p) )
{
}
min *= 10;
- min += *p++ - _T('0');
+ min = (wxDateTime_t)(min + *p++ - _T('0'));
wxDateTime_t sec = 0;
if ( *p++ == _T(':') )
return (wxChar *)NULL;
}
- sec = *p++ - _T('0');
+ sec = (wxDateTime_t)(*p++ - _T('0'));
if ( !wxIsdigit(*p) )
{
}
sec *= 10;
- sec += *p++ - _T('0');
+ sec = (wxDateTime_t)(sec + *p++ - _T('0'));
}
if ( *p++ != _T(' ') )
}
else // may be either day or year
{
- wxDateTime_t maxDays = haveMon
+ wxDateTime_t maxDays = (wxDateTime_t)(
+ haveMon
? GetNumOfDaysInMonth(haveYear ? year : Inv_Year, mon)
- : 31;
+ : 31
+ );
// can it be day?
if ( (val == 0) || (val > (unsigned long)maxDays) )
{
// no need to check in month range as always < 12, but
// the days are counted from 1 unlike the months
- day = (wxDateTime_t)mon + 1;
+ day = (wxDateTime_t)(mon + 1);
haveDay = true;
}
else
// we're in the current year then
if ( (year > 0) && (year <= (int)GetNumOfDaysInMonth(Inv_Year, mon)) )
{
- day = year;
+ day = (wxDateTime_t)year;
haveMon = true;
haveYear = false;
ms_authorities.push_back(auth);
}
-wxDateTimeHolidayAuthority::~wxDateTimeHolidayAuthority()
-{
- // nothing to do here
-}
-
// ----------------------------------------------------------------------------
// wxDateTimeWorkDays
// ----------------------------------------------------------------------------
}
wxPoint child_pos( pt );
- wxSize child_size( wxSize( size.x, height) );
+ wxSize child_size( size.x, height );
if (item->GetFlag() & (wxEXPAND | wxSHAPED))
child_size.x = m_size.x;
}
wxPoint child_pos( pt );
- wxSize child_size( wxSize(width, size.y) );
+ wxSize child_size( width, size.y );
if (item->GetFlag() & (wxEXPAND | wxSHAPED))
child_size.y = m_size.y;
m_isOpened = false;
}
-wxTextBuffer::~wxTextBuffer()
-{
-}
-
// ----------------------------------------------------------------------------
// buffer operations
// ----------------------------------------------------------------------------
{
const wxSize sizeChoice = m_choice->GetSize();
- wxRect rectPage(wxPoint(0, 0), GetClientSize());
+ wxPoint pt(0, 0);
+ wxRect rectPage(pt, GetClientSize());
switch ( GetWindowStyle() & wxCHB_ALIGN_MASK )
{
default:
char tmpbuf[2];
tmpbuf[0] = (char) keycode;
tmpbuf[1] = '\0';
- bool is_decimal_point = ( wxString(tmpbuf, *wxConvCurrent) ==
+ wxString strbuf(tmpbuf, *wxConvCurrent);
+ bool is_decimal_point = ( strbuf ==
wxLocale::GetInfo(wxLOCALE_DECIMAL_POINT, wxLOCALE_CAT_NUMBER) );
if ( wxIsdigit(keycode) || keycode == '+' || keycode == '-'
|| is_decimal_point
{
RegisterDataType(wxGRID_VALUE_STRING,
GetDefaultRendererForType(wxGRID_VALUE_STRING),
- editor);
+ editor);
}
// ----------------------------------------------------------------------------
if (!width) width=100;
if (!height) height=80;
-
+
// Round up to a multiple the scroll rate NOTE: this still doesn't get rid
// of the scrollbars, is there any magic incantaion for that?
int xpu, ypu;
width += 1 + xpu - (width % xpu);
if (ypu)
height += 1 + ypu - (height % ypu);
-
+
// limit to 1/4 of the screen size
int maxwidth, maxheight;
wxDisplaySize( & maxwidth, & maxheight );
maxwidth /= 2;
- maxheight /= 2;
+ maxheight /= 2;
if ( width > maxwidth ) width = maxwidth;
if ( height > maxheight ) height = maxheight;
-
+
wxSize best(width, height);
// NOTE: This size should be cached, but first we need to add calls to
// InvalidateBestSize everywhere that could change the results of this
{
const wxSize sizeList = m_list->GetSize();
- wxRect rectPage(wxPoint(0, 0), GetClientSize());
+ wxPoint pt(0, 0);
+ wxRect rectPage(pt, GetClientSize());
switch ( GetWindowStyle() & wxLB_ALIGN_MASK )
{
default:
// index of the selected page
if ( int(n) <= m_selection )
{
- // one extra page added
+ // one extra page added
m_selection++;
m_list->Select(m_selection);
m_list->Focus(m_selection);
wxPen darkShadowPen(m_darkShadowColour, 1, wxSOLID);
wxPen lightShadowPen(m_lightShadowColour, 1, wxSOLID);
wxPen hilightPen(m_hilightColour, 1, wxSOLID);
- wxPen blackPen(wxColour(0, 0, 0), 1, wxSOLID);
- wxPen whitePen(wxColour(255, 255, 255), 1, wxSOLID);
+ wxColour blackClr(0, 0, 0);
+ wxColour whiteClr(255, 255, 255);
+ wxPen blackPen(blackClr, 1, wxSOLID);
+ wxPen whitePen(whiteClr, 1, wxSOLID);
if ( edge == wxSASH_LEFT || edge == wxSASH_RIGHT )
{
return -1;
if (ib == NULL)
return 1;
-
+
if (ia->parent == ib->parent)
{
return ia->name.CmpNoCase(ib->name);
lineptr = ReadLine(lineptr, linebuf, 300);
for (wxChar *ch = linebuf; *ch != wxT('\0') && *ch != wxT('='); ch++)
- *ch = tolower(*ch);
+ *ch = (wxChar)wxTolower(*ch);
if (wxStrstr(linebuf, _T("title=")) == linebuf)
title = linebuf + wxStrlen(_T("title="));
// other items, show them as well, because they are refinements
// of the displayed index entry (i.e. it is implicitly contained
// in them: "foo" with parent "bar" reads as "bar, foo"):
- short int level = index[i].items[0]->level;
+ int level = index[i].items[0]->level;
i++;
while (i < cnt && index[i].items[0]->level > level)
{
src[pos] != wxT('>') && !wxIsspace(src[pos]);
i++, pos++ )
{
- tagBuffer[i] = wxToupper(src[pos]);
+ tagBuffer[i] = (wxChar)wxToupper(src[pos]);
}
tagBuffer[i] = _T('\0');
// +1 for terminating NUL
wxString result;
- ListBox_GetText(GetHwnd(), N, wxStringBuffer(result, len + 1));
+ wxChar* buffer = result.GetWriteBuf(len + 1);
+ ListBox_GetText(GetHwnd(), N, buffer);
+ result.UngetWriteBuf();
return result;
}
wxListBoxItem *pItem = (wxListBoxItem *)data;
wxDCTemp dc((WXHDC)pStruct->hDC);
- wxRect rect(wxPoint(pStruct->rcItem.left, pStruct->rcItem.top),
- wxPoint(pStruct->rcItem.right, pStruct->rcItem.bottom));
+ wxPoint pt1(pStruct->rcItem.left, pStruct->rcItem.top);
+ wxPoint pt2(pStruct->rcItem.right, pStruct->rcItem.bottom);
+ wxRect rect(pt1, pt2);
return pItem->OnDrawItem(dc, rect,
(wxOwnerDrawn::wxODAction)pStruct->itemAction,
}
}
-wxRegConfig::~wxRegConfig()
-{
- // nothing to do - key will be closed in their dtors
-}
-
// ----------------------------------------------------------------------------
// path management
// ----------------------------------------------------------------------------
// We must build conversion table for expat. The easiest way to do so
// is to let wxCSConv convert as string containing all characters to
// wide character representation:
- wxCSConv conv(wxString(name, wxConvLibc));
+ wxString str(name, wxConvLibc);
+ wxCSConv conv(str);
char mbBuf[2];
wchar_t wcBuf[10];
size_t i;
}
info->map[i+1] = (int)wcBuf[0];
}
-
+
info->data = NULL;
info->convert = NULL;
info->release = NULL;