void wxControlBase::InitCommandEvent(wxCommandEvent& event) const
{
- event.SetEventObject((wxControlBase *)this); // const_cast
+ event.SetEventObject(const_cast<wxControlBase *>(this));
// event.SetId(GetId()); -- this is usuall done in the event ctor
// NOTE: the following piece of code works also when len == 1
// start the removal process from the middle of the string
- // i.e. separe the string in three parts:
+ // i.e. separe the string in three parts:
// - the first one to preserve, valid range [0;initialCharToRemove-1] or the empty range if initialCharToRemove==0
// - the second one to remove, valid range [initialCharToRemove;endCharToRemove]
// - the third one to preserve, valid range [endCharToRemove+1;len-1] or the empty range if endCharToRemove==len-1
if (initialCharToRemove >= 2)
widthPx = charOffsetsPx[initialCharToRemove-1] - charOffsetsPx[initialCharToRemove-2];
else
- widthPx = charOffsetsPx[initialCharToRemove-1];
+ widthPx = charOffsetsPx[initialCharToRemove-1];
// the (initialCharToRemove-1)-th character is the first char of the string
-
+
wxASSERT(widthPx >= 0); // widthPx is zero for e.g. tab characters
// mark the (initialCharToRemove-1)-th character as removable
return curLine;
}
- wxASSERT(initialCharToRemove >= 0 && initialCharToRemove <= len-1); // see valid range for initialCharToRemove above
+#ifdef __VMS
+#pragma message disable unscomzer
+ // suppress warnings on comparison of unsigned numbers
+#endif
+ wxASSERT(initialCharToRemove >= 0 && initialCharToRemove <= len-1); // see valid range for initialCharToRemove above
+#ifdef __VMS
+#pragma message enable unscomzer
+ // suppress warnings on comparison of unsigned numbers
+#endif
wxASSERT(nCharsToRemove >= 1 && nCharsToRemove <= len-initialCharToRemove); // see valid range for nCharsToRemove above
// erase nCharsToRemove characters after initialCharToRemove (included);
int removedPx;
if (initialCharToRemove >= 1)
removedPx = charOffsetsPx[initialCharToRemove+nCharsToRemove-1] - charOffsetsPx[initialCharToRemove-1];
- else
+ else
removedPx = charOffsetsPx[initialCharToRemove+nCharsToRemove-1];
wxASSERT(removedPx >= excessPx);