Fix lots of warnings reported by Clang.
Mostly potentially lossy implicit conversions in headers (long->int). Also dangling else warnings. Struct/class mismatches. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74473 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -4557,8 +4557,8 @@ public:
|
||||
}
|
||||
virtual void Replace(long from, long to, const wxString& text)
|
||||
{
|
||||
SetTargetStart(from);
|
||||
SetTargetEnd(to);
|
||||
SetTargetStart((int)from);
|
||||
SetTargetEnd((int)to);
|
||||
ReplaceTarget(text);
|
||||
}
|
||||
|
||||
@@ -4579,7 +4579,7 @@ public:
|
||||
|
||||
virtual void SetInsertionPoint(long pos)
|
||||
{
|
||||
SetCurrentPos(pos == -1 ? GetLastPosition() : pos);
|
||||
SetCurrentPos(int(pos == -1 ? GetLastPosition() : pos));
|
||||
}
|
||||
virtual long GetInsertionPoint() const { return GetCurrentPos(); }
|
||||
virtual long GetLastPosition() const { return GetTextLength(); }
|
||||
@@ -4592,8 +4592,8 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
SetSelectionStart(from);
|
||||
SetSelectionEnd(to);
|
||||
SetSelectionStart((int)from);
|
||||
SetSelectionEnd((int)to);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4619,9 +4619,9 @@ public:
|
||||
long f, t;
|
||||
GetSelection(&f, &t);
|
||||
if ( from )
|
||||
*from = f;
|
||||
*from = (int)f;
|
||||
if ( to )
|
||||
*to = t;
|
||||
*to = (int)t;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -4673,14 +4673,14 @@ public:
|
||||
|
||||
virtual long XYToPosition(long x, long y) const
|
||||
{
|
||||
long pos = PositionFromLine(y);
|
||||
long pos = PositionFromLine((int)y);
|
||||
pos += x;
|
||||
return pos;
|
||||
}
|
||||
|
||||
virtual bool PositionToXY(long pos, long *x, long *y) const
|
||||
{
|
||||
long l = LineFromPosition(pos);
|
||||
int l = LineFromPosition((int)pos);
|
||||
if ( l == -1 )
|
||||
return false;
|
||||
|
||||
@@ -4693,7 +4693,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual void ShowPosition(long pos) { GotoPos(pos); }
|
||||
virtual void ShowPosition(long pos) { GotoPos((int)pos); }
|
||||
|
||||
// FIXME-VC6: can't use wxWindow here because of "error C2603: illegal
|
||||
// access declaration: 'wxWindow' is not a direct base of
|
||||
|
Reference in New Issue
Block a user