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:
@@ -251,7 +251,7 @@ protected: \
|
|||||||
typedef const value_type* const_iterator; \
|
typedef const value_type* const_iterator; \
|
||||||
typedef value_type& reference; \
|
typedef value_type& reference; \
|
||||||
typedef const value_type& const_reference; \
|
typedef const value_type& const_reference; \
|
||||||
typedef int difference_type; \
|
typedef ptrdiff_t difference_type; \
|
||||||
typedef size_t size_type; \
|
typedef size_t size_type; \
|
||||||
\
|
\
|
||||||
void assign(const_iterator first, const_iterator last); \
|
void assign(const_iterator first, const_iterator last); \
|
||||||
|
@@ -381,27 +381,27 @@ inline wxSize operator/(const wxSize& s, long i)
|
|||||||
|
|
||||||
inline wxSize operator*(const wxSize& s, long i)
|
inline wxSize operator*(const wxSize& s, long i)
|
||||||
{
|
{
|
||||||
return wxSize(s.x * i, s.y * i);
|
return wxSize(int(s.x * i), int(s.y * i));
|
||||||
}
|
}
|
||||||
|
|
||||||
inline wxSize operator*(long i, const wxSize& s)
|
inline wxSize operator*(long i, const wxSize& s)
|
||||||
{
|
{
|
||||||
return wxSize(s.x * i, s.y * i);
|
return wxSize(int(s.x * i), int(s.y * i));
|
||||||
}
|
}
|
||||||
|
|
||||||
inline wxSize operator/(const wxSize& s, unsigned long i)
|
inline wxSize operator/(const wxSize& s, unsigned long i)
|
||||||
{
|
{
|
||||||
return wxSize(s.x / i, s.y / i);
|
return wxSize(int(s.x / i), int(s.y / i));
|
||||||
}
|
}
|
||||||
|
|
||||||
inline wxSize operator*(const wxSize& s, unsigned long i)
|
inline wxSize operator*(const wxSize& s, unsigned long i)
|
||||||
{
|
{
|
||||||
return wxSize(s.x * i, s.y * i);
|
return wxSize(int(s.x * i), int(s.y * i));
|
||||||
}
|
}
|
||||||
|
|
||||||
inline wxSize operator*(unsigned long i, const wxSize& s)
|
inline wxSize operator*(unsigned long i, const wxSize& s)
|
||||||
{
|
{
|
||||||
return wxSize(s.x * i, s.y * i);
|
return wxSize(int(s.x * i), int(s.y * i));
|
||||||
}
|
}
|
||||||
|
|
||||||
inline wxSize operator*(const wxSize& s, double i)
|
inline wxSize operator*(const wxSize& s, double i)
|
||||||
@@ -655,12 +655,12 @@ inline wxPoint operator/(const wxPoint& s, long i)
|
|||||||
|
|
||||||
inline wxPoint operator*(const wxPoint& s, long i)
|
inline wxPoint operator*(const wxPoint& s, long i)
|
||||||
{
|
{
|
||||||
return wxPoint(s.x * i, s.y * i);
|
return wxPoint(int(s.x * i), int(s.y * i));
|
||||||
}
|
}
|
||||||
|
|
||||||
inline wxPoint operator*(long i, const wxPoint& s)
|
inline wxPoint operator*(long i, const wxPoint& s)
|
||||||
{
|
{
|
||||||
return wxPoint(s.x * i, s.y * i);
|
return wxPoint(int(s.x * i), int(s.y * i));
|
||||||
}
|
}
|
||||||
|
|
||||||
inline wxPoint operator/(const wxPoint& s, unsigned long i)
|
inline wxPoint operator/(const wxPoint& s, unsigned long i)
|
||||||
@@ -670,12 +670,12 @@ inline wxPoint operator/(const wxPoint& s, unsigned long i)
|
|||||||
|
|
||||||
inline wxPoint operator*(const wxPoint& s, unsigned long i)
|
inline wxPoint operator*(const wxPoint& s, unsigned long i)
|
||||||
{
|
{
|
||||||
return wxPoint(s.x * i, s.y * i);
|
return wxPoint(int(s.x * i), int(s.y * i));
|
||||||
}
|
}
|
||||||
|
|
||||||
inline wxPoint operator*(unsigned long i, const wxPoint& s)
|
inline wxPoint operator*(unsigned long i, const wxPoint& s)
|
||||||
{
|
{
|
||||||
return wxPoint(s.x * i, s.y * i);
|
return wxPoint(int(s.x * i), int(s.y * i));
|
||||||
}
|
}
|
||||||
|
|
||||||
inline wxPoint operator*(const wxPoint& s, double i)
|
inline wxPoint operator*(const wxPoint& s, double i)
|
||||||
|
@@ -398,7 +398,7 @@ public:
|
|||||||
void Add(wxColour col, float pos) { Add(wxGraphicsGradientStop(col, pos)); }
|
void Add(wxColour col, float pos) { Add(wxGraphicsGradientStop(col, pos)); }
|
||||||
|
|
||||||
// Get the number of stops.
|
// Get the number of stops.
|
||||||
unsigned GetCount() const { return m_stops.size(); }
|
size_t GetCount() const { return m_stops.size(); }
|
||||||
|
|
||||||
// Return the stop at the given index (which must be valid).
|
// Return the stop at the given index (which must be valid).
|
||||||
wxGraphicsGradientStop Item(unsigned n) const { return m_stops.at(n); }
|
wxGraphicsGradientStop Item(unsigned n) const { return m_stops.at(n); }
|
||||||
|
@@ -483,8 +483,9 @@ inline bool grow_lf70( size_t buckets, size_t items )
|
|||||||
#ifndef wxNEEDS_WX_HASH_MAP
|
#ifndef wxNEEDS_WX_HASH_MAP
|
||||||
|
|
||||||
// integer types
|
// integer types
|
||||||
class WXDLLIMPEXP_BASE wxIntegerHash
|
struct WXDLLIMPEXP_BASE wxIntegerHash
|
||||||
{
|
{
|
||||||
|
private:
|
||||||
WX_HASH_MAP_NAMESPACE::hash<long> longHash;
|
WX_HASH_MAP_NAMESPACE::hash<long> longHash;
|
||||||
WX_HASH_MAP_NAMESPACE::hash<unsigned long> ulongHash;
|
WX_HASH_MAP_NAMESPACE::hash<unsigned long> ulongHash;
|
||||||
WX_HASH_MAP_NAMESPACE::hash<int> intHash;
|
WX_HASH_MAP_NAMESPACE::hash<int> intHash;
|
||||||
@@ -527,9 +528,8 @@ public:
|
|||||||
#else // wxNEEDS_WX_HASH_MAP
|
#else // wxNEEDS_WX_HASH_MAP
|
||||||
|
|
||||||
// integer types
|
// integer types
|
||||||
class WXDLLIMPEXP_BASE wxIntegerHash
|
struct WXDLLIMPEXP_BASE wxIntegerHash
|
||||||
{
|
{
|
||||||
public:
|
|
||||||
wxIntegerHash() { }
|
wxIntegerHash() { }
|
||||||
unsigned long operator()( long x ) const { return (unsigned long)x; }
|
unsigned long operator()( long x ) const { return (unsigned long)x; }
|
||||||
unsigned long operator()( unsigned long x ) const { return x; }
|
unsigned long operator()( unsigned long x ) const { return x; }
|
||||||
@@ -547,9 +547,8 @@ public:
|
|||||||
|
|
||||||
#endif // !wxNEEDS_WX_HASH_MAP/wxNEEDS_WX_HASH_MAP
|
#endif // !wxNEEDS_WX_HASH_MAP/wxNEEDS_WX_HASH_MAP
|
||||||
|
|
||||||
class WXDLLIMPEXP_BASE wxIntegerEqual
|
struct WXDLLIMPEXP_BASE wxIntegerEqual
|
||||||
{
|
{
|
||||||
public:
|
|
||||||
wxIntegerEqual() { }
|
wxIntegerEqual() { }
|
||||||
bool operator()( long a, long b ) const { return a == b; }
|
bool operator()( long a, long b ) const { return a == b; }
|
||||||
bool operator()( unsigned long a, unsigned long b ) const { return a == b; }
|
bool operator()( unsigned long a, unsigned long b ) const { return a == b; }
|
||||||
@@ -566,9 +565,8 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
// pointers
|
// pointers
|
||||||
class WXDLLIMPEXP_BASE wxPointerHash
|
struct WXDLLIMPEXP_BASE wxPointerHash
|
||||||
{
|
{
|
||||||
public:
|
|
||||||
wxPointerHash() { }
|
wxPointerHash() { }
|
||||||
|
|
||||||
#ifdef wxNEEDS_WX_HASH_MAP
|
#ifdef wxNEEDS_WX_HASH_MAP
|
||||||
@@ -580,9 +578,8 @@ public:
|
|||||||
wxPointerHash& operator=(const wxPointerHash&) { return *this; }
|
wxPointerHash& operator=(const wxPointerHash&) { return *this; }
|
||||||
};
|
};
|
||||||
|
|
||||||
class WXDLLIMPEXP_BASE wxPointerEqual
|
struct WXDLLIMPEXP_BASE wxPointerEqual
|
||||||
{
|
{
|
||||||
public:
|
|
||||||
wxPointerEqual() { }
|
wxPointerEqual() { }
|
||||||
bool operator()( const void* a, const void* b ) const { return a == b; }
|
bool operator()( const void* a, const void* b ) const { return a == b; }
|
||||||
|
|
||||||
@@ -590,9 +587,8 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
// wxString, char*, wchar_t*
|
// wxString, char*, wchar_t*
|
||||||
class WXDLLIMPEXP_BASE wxStringHash
|
struct WXDLLIMPEXP_BASE wxStringHash
|
||||||
{
|
{
|
||||||
public:
|
|
||||||
wxStringHash() {}
|
wxStringHash() {}
|
||||||
unsigned long operator()( const wxString& x ) const
|
unsigned long operator()( const wxString& x ) const
|
||||||
{ return stringHash( x.wx_str() ); }
|
{ return stringHash( x.wx_str() ); }
|
||||||
@@ -616,9 +612,8 @@ public:
|
|||||||
wxStringHash& operator=(const wxStringHash&) { return *this; }
|
wxStringHash& operator=(const wxStringHash&) { return *this; }
|
||||||
};
|
};
|
||||||
|
|
||||||
class WXDLLIMPEXP_BASE wxStringEqual
|
struct WXDLLIMPEXP_BASE wxStringEqual
|
||||||
{
|
{
|
||||||
public:
|
|
||||||
wxStringEqual() {}
|
wxStringEqual() {}
|
||||||
bool operator()( const wxString& a, const wxString& b ) const
|
bool operator()( const wxString& a, const wxString& b ) const
|
||||||
{ return a == b; }
|
{ return a == b; }
|
||||||
|
@@ -345,9 +345,9 @@ protected:
|
|||||||
wxHtmlContainerCell *m_Parent;
|
wxHtmlContainerCell *m_Parent;
|
||||||
|
|
||||||
// dimensions of fragment (m_Descent is used to position text & images)
|
// dimensions of fragment (m_Descent is used to position text & images)
|
||||||
long m_Width, m_Height, m_Descent;
|
int m_Width, m_Height, m_Descent;
|
||||||
// position where the fragment is drawn:
|
// position where the fragment is drawn:
|
||||||
long m_PosX, m_PosY;
|
int m_PosX, m_PosY;
|
||||||
|
|
||||||
// superscript/subscript/normal:
|
// superscript/subscript/normal:
|
||||||
wxHtmlScriptMode m_ScriptMode;
|
wxHtmlScriptMode m_ScriptMode;
|
||||||
|
@@ -165,9 +165,9 @@ private:
|
|||||||
|
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY_2_8
|
#if WXWIN_COMPATIBILITY_2_8
|
||||||
inline int wxHtmlTag::GetBeginPos() const { return m_Begin - m_sourceStart; }
|
inline int wxHtmlTag::GetBeginPos() const { return int(m_Begin - m_sourceStart); }
|
||||||
inline int wxHtmlTag::GetEndPos1() const { return m_End1 - m_sourceStart; }
|
inline int wxHtmlTag::GetEndPos1() const { return int(m_End1 - m_sourceStart); }
|
||||||
inline int wxHtmlTag::GetEndPos2() const { return m_End2 - m_sourceStart; }
|
inline int wxHtmlTag::GetEndPos2() const { return int(m_End2 - m_sourceStart); }
|
||||||
#endif // WXWIN_COMPATIBILITY_2_8
|
#endif // WXWIN_COMPATIBILITY_2_8
|
||||||
|
|
||||||
|
|
||||||
|
@@ -204,7 +204,7 @@ private:
|
|||||||
// actual hypertext link or empty string
|
// actual hypertext link or empty string
|
||||||
bool m_UseLink;
|
bool m_UseLink;
|
||||||
// true if m_Link is not empty
|
// true if m_Link is not empty
|
||||||
long m_CharHeight, m_CharWidth;
|
int m_CharHeight, m_CharWidth;
|
||||||
// average height of normal-sized text
|
// average height of normal-sized text
|
||||||
int m_Align;
|
int m_Align;
|
||||||
// actual alignment
|
// actual alignment
|
||||||
|
@@ -218,7 +218,7 @@ inline const void *wxListCastElementToVoidPtr(const wxString& str)
|
|||||||
} \
|
} \
|
||||||
int IndexOf() const \
|
int IndexOf() const \
|
||||||
{ \
|
{ \
|
||||||
return *this ? std::distance( m_list->begin(), m_iter ) \
|
return *this ? (int)std::distance( m_list->begin(), m_iter ) \
|
||||||
: wxNOT_FOUND; \
|
: wxNOT_FOUND; \
|
||||||
} \
|
} \
|
||||||
}; \
|
}; \
|
||||||
|
@@ -1067,7 +1067,7 @@ inline wxULongLong operator+(unsigned long l, const wxULongLong& ull) { return u
|
|||||||
inline wxLongLong operator-(unsigned long l, const wxULongLong& ull)
|
inline wxLongLong operator-(unsigned long l, const wxULongLong& ull)
|
||||||
{
|
{
|
||||||
wxULongLong ret = wxULongLong(l) - ull;
|
wxULongLong ret = wxULongLong(l) - ull;
|
||||||
return wxLongLong((long)ret.GetHi(),ret.GetLo());
|
return wxLongLong((wxInt32)ret.GetHi(),ret.GetLo());
|
||||||
}
|
}
|
||||||
|
|
||||||
#if wxUSE_LONGLONG_NATIVE && wxUSE_STREAMS
|
#if wxUSE_LONGLONG_NATIVE && wxUSE_STREAMS
|
||||||
|
@@ -87,7 +87,7 @@ public:
|
|||||||
long GetWidth() const { return GetW(); }
|
long GetWidth() const { return GetW(); }
|
||||||
long GetH() const;
|
long GetH() const;
|
||||||
long GetHeight() const { return GetH(); }
|
long GetHeight() const { return GetH(); }
|
||||||
wxRect GetRect() const { return wxRect(GetX(), GetY(), GetWidth(), GetHeight()); }
|
wxRect GetRect() const { return wxRect((int)GetX(), (int)GetY(), (int)GetWidth(), (int)GetHeight()); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void SetRects(long numRects, wxRect *rects);
|
void SetRects(long numRects, wxRect *rects);
|
||||||
|
@@ -814,7 +814,7 @@ protected:
|
|||||||
"Can't calculate number of cols if number of rows is not specified"
|
"Can't calculate number of cols if number of rows is not specified"
|
||||||
);
|
);
|
||||||
|
|
||||||
return (m_children.GetCount() + m_rows - 1) / m_rows;
|
return int(m_children.GetCount() + m_rows - 1) / m_rows;
|
||||||
}
|
}
|
||||||
|
|
||||||
int CalcRows() const
|
int CalcRows() const
|
||||||
@@ -825,7 +825,7 @@ protected:
|
|||||||
"Can't calculate number of cols if number of rows is not specified"
|
"Can't calculate number of cols if number of rows is not specified"
|
||||||
);
|
);
|
||||||
|
|
||||||
return (m_children.GetCount() + m_cols - 1) / m_cols;
|
return int(m_children.GetCount() + m_cols - 1) / m_cols;
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@@ -54,7 +54,7 @@ extern WXDLLIMPEXP_DATA_CORE(const char) wxStatusBarNameStr[];
|
|||||||
class WXDLLIMPEXP_CORE wxStatusBarPane
|
class WXDLLIMPEXP_CORE wxStatusBarPane
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxStatusBarPane(int style = wxSB_NORMAL, size_t width = 0)
|
wxStatusBarPane(int style = wxSB_NORMAL, int width = 0)
|
||||||
: m_nStyle(style), m_nWidth(width)
|
: m_nStyle(style), m_nWidth(width)
|
||||||
{ m_bEllipsized = false; }
|
{ m_bEllipsized = false; }
|
||||||
|
|
||||||
@@ -120,7 +120,7 @@ public:
|
|||||||
// set the number of fields and call SetStatusWidths(widths) if widths are
|
// set the number of fields and call SetStatusWidths(widths) if widths are
|
||||||
// given
|
// given
|
||||||
virtual void SetFieldsCount(int number = 1, const int *widths = NULL);
|
virtual void SetFieldsCount(int number = 1, const int *widths = NULL);
|
||||||
int GetFieldsCount() const { return m_panes.GetCount(); }
|
int GetFieldsCount() const { return (int)m_panes.GetCount(); }
|
||||||
|
|
||||||
// field text
|
// field text
|
||||||
// ----------
|
// ----------
|
||||||
|
@@ -4557,8 +4557,8 @@ public:
|
|||||||
}
|
}
|
||||||
virtual void Replace(long from, long to, const wxString& text)
|
virtual void Replace(long from, long to, const wxString& text)
|
||||||
{
|
{
|
||||||
SetTargetStart(from);
|
SetTargetStart((int)from);
|
||||||
SetTargetEnd(to);
|
SetTargetEnd((int)to);
|
||||||
ReplaceTarget(text);
|
ReplaceTarget(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4579,7 +4579,7 @@ public:
|
|||||||
|
|
||||||
virtual void SetInsertionPoint(long pos)
|
virtual void SetInsertionPoint(long pos)
|
||||||
{
|
{
|
||||||
SetCurrentPos(pos == -1 ? GetLastPosition() : pos);
|
SetCurrentPos(int(pos == -1 ? GetLastPosition() : pos));
|
||||||
}
|
}
|
||||||
virtual long GetInsertionPoint() const { return GetCurrentPos(); }
|
virtual long GetInsertionPoint() const { return GetCurrentPos(); }
|
||||||
virtual long GetLastPosition() const { return GetTextLength(); }
|
virtual long GetLastPosition() const { return GetTextLength(); }
|
||||||
@@ -4592,8 +4592,8 @@ public:
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetSelectionStart(from);
|
SetSelectionStart((int)from);
|
||||||
SetSelectionEnd(to);
|
SetSelectionEnd((int)to);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4619,9 +4619,9 @@ public:
|
|||||||
long f, t;
|
long f, t;
|
||||||
GetSelection(&f, &t);
|
GetSelection(&f, &t);
|
||||||
if ( from )
|
if ( from )
|
||||||
*from = f;
|
*from = (int)f;
|
||||||
if ( to )
|
if ( to )
|
||||||
*to = t;
|
*to = (int)t;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -4673,14 +4673,14 @@ public:
|
|||||||
|
|
||||||
virtual long XYToPosition(long x, long y) const
|
virtual long XYToPosition(long x, long y) const
|
||||||
{
|
{
|
||||||
long pos = PositionFromLine(y);
|
long pos = PositionFromLine((int)y);
|
||||||
pos += x;
|
pos += x;
|
||||||
return pos;
|
return pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool PositionToXY(long pos, long *x, long *y) const
|
virtual bool PositionToXY(long pos, long *x, long *y) const
|
||||||
{
|
{
|
||||||
long l = LineFromPosition(pos);
|
int l = LineFromPosition((int)pos);
|
||||||
if ( l == -1 )
|
if ( l == -1 )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@@ -4693,7 +4693,7 @@ public:
|
|||||||
return true;
|
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
|
// FIXME-VC6: can't use wxWindow here because of "error C2603: illegal
|
||||||
// access declaration: 'wxWindow' is not a direct base of
|
// access declaration: 'wxWindow' is not a direct base of
|
||||||
|
@@ -889,7 +889,7 @@ public:
|
|||||||
public: \
|
public: \
|
||||||
WX_DEFINE_ITERATOR_CATEGORY(WX_STR_ITERATOR_TAG) \
|
WX_DEFINE_ITERATOR_CATEGORY(WX_STR_ITERATOR_TAG) \
|
||||||
typedef wxUniChar value_type; \
|
typedef wxUniChar value_type; \
|
||||||
typedef int difference_type; \
|
typedef ptrdiff_t difference_type; \
|
||||||
typedef reference_type reference; \
|
typedef reference_type reference; \
|
||||||
typedef pointer_type pointer; \
|
typedef pointer_type pointer; \
|
||||||
\
|
\
|
||||||
|
@@ -36,7 +36,7 @@ public:
|
|||||||
wxUniChar(unsigned char c) { m_value = From8bit((char)c); }
|
wxUniChar(unsigned char c) { m_value = From8bit((char)c); }
|
||||||
|
|
||||||
#define wxUNICHAR_DEFINE_CTOR(type) \
|
#define wxUNICHAR_DEFINE_CTOR(type) \
|
||||||
wxUniChar(type c) { m_value = c; }
|
wxUniChar(type c) { m_value = (value_type)c; }
|
||||||
wxDO_FOR_INT_TYPES(wxUNICHAR_DEFINE_CTOR)
|
wxDO_FOR_INT_TYPES(wxUNICHAR_DEFINE_CTOR)
|
||||||
#undef wxUNICHAR_DEFINE_CTOR
|
#undef wxUNICHAR_DEFINE_CTOR
|
||||||
|
|
||||||
@@ -112,7 +112,7 @@ public:
|
|||||||
wxUniChar& operator=(unsigned char c) { m_value = From8bit((char)c); return *this; }
|
wxUniChar& operator=(unsigned char c) { m_value = From8bit((char)c); return *this; }
|
||||||
|
|
||||||
#define wxUNICHAR_DEFINE_OPERATOR_EQUAL(type) \
|
#define wxUNICHAR_DEFINE_OPERATOR_EQUAL(type) \
|
||||||
wxUniChar& operator=(type c) { m_value = c; return *this; }
|
wxUniChar& operator=(type c) { m_value = (value_type)c; return *this; }
|
||||||
wxDO_FOR_INT_TYPES(wxUNICHAR_DEFINE_OPERATOR_EQUAL)
|
wxDO_FOR_INT_TYPES(wxUNICHAR_DEFINE_OPERATOR_EQUAL)
|
||||||
#undef wxUNICHAR_DEFINE_OPERATOR_EQUAL
|
#undef wxUNICHAR_DEFINE_OPERATOR_EQUAL
|
||||||
|
|
||||||
|
@@ -43,7 +43,7 @@ public:
|
|||||||
|
|
||||||
wxWindowIDRef(long id)
|
wxWindowIDRef(long id)
|
||||||
{
|
{
|
||||||
Init(id);
|
Init(wxWindowID(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
wxWindowIDRef(const wxWindowIDRef& id)
|
wxWindowIDRef(const wxWindowIDRef& id)
|
||||||
@@ -66,7 +66,7 @@ public:
|
|||||||
|
|
||||||
wxWindowIDRef& operator=(long id)
|
wxWindowIDRef& operator=(long id)
|
||||||
{
|
{
|
||||||
Assign(id);
|
Assign(wxWindowID(id));
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -981,7 +981,7 @@ public:
|
|||||||
/**
|
/**
|
||||||
Returns the number of stops.
|
Returns the number of stops.
|
||||||
*/
|
*/
|
||||||
unsigned GetCount() const;
|
size_t GetCount() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Set the start colour to @a col
|
Set the start colour to @a col
|
||||||
|
@@ -39,7 +39,7 @@ public:
|
|||||||
/**
|
/**
|
||||||
Constructs the pane with the given @a style and @a width.
|
Constructs the pane with the given @a style and @a width.
|
||||||
*/
|
*/
|
||||||
wxStatusBarPane(int style = wxSB_NORMAL, size_t width = 0);
|
wxStatusBarPane(int style = wxSB_NORMAL, int width = 0);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns the pane width; it maybe negative, indicating a variable-width field.
|
Returns the pane width; it maybe negative, indicating a variable-width field.
|
||||||
|
@@ -484,7 +484,9 @@ WX_IMPLEMENT_ANY_VALUE_TYPE(wxAnyValueTypeImpl<wxDateTime>)
|
|||||||
|
|
||||||
class wxAnyNullValue
|
class wxAnyNullValue
|
||||||
{
|
{
|
||||||
private:
|
protected:
|
||||||
|
// this field is unused, but can't be private to avoid Clang's
|
||||||
|
// "Private field 'm_dummy' is not used" warning
|
||||||
void* m_dummy;
|
void* m_dummy;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -1390,7 +1390,7 @@ wxChar *wxDoGetCwd(wxChar *buf, int sz)
|
|||||||
buf = new wxChar[sz + 1];
|
buf = new wxChar[sz + 1];
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ok wxDUMMY_INITIALIZE(false);
|
bool ok = false;
|
||||||
|
|
||||||
// for the compilers which have Unicode version of _getcwd(), call it
|
// for the compilers which have Unicode version of _getcwd(), call it
|
||||||
// directly, for the others call the ANSI version and do the translation
|
// directly, for the others call the ANSI version and do the translation
|
||||||
|
@@ -571,12 +571,14 @@ bool wxLocale::Init(int language, int flags)
|
|||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
|
|
||||||
|
#ifndef __WXOSX__
|
||||||
// Small helper function: get the value of the given environment variable and
|
// Small helper function: get the value of the given environment variable and
|
||||||
// return true only if the variable was found and has non-empty value.
|
// return true only if the variable was found and has non-empty value.
|
||||||
inline bool wxGetNonEmptyEnvVar(const wxString& name, wxString* value)
|
inline bool wxGetNonEmptyEnvVar(const wxString& name, wxString* value)
|
||||||
{
|
{
|
||||||
return wxGetEnv(name, value) && !value->empty();
|
return wxGetEnv(name, value) && !value->empty();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
} // anonymous namespace
|
} // anonymous namespace
|
||||||
|
|
||||||
@@ -591,7 +593,7 @@ inline bool wxGetNonEmptyEnvVar(const wxString& name, wxString* value)
|
|||||||
#if defined(__UNIX__)
|
#if defined(__UNIX__)
|
||||||
// first get the string identifying the language from the environment
|
// first get the string identifying the language from the environment
|
||||||
wxString langFull;
|
wxString langFull;
|
||||||
#ifdef __WXMAC__
|
#ifdef __WXOSX__
|
||||||
wxCFRef<CFLocaleRef> userLocaleRef(CFLocaleCopyCurrent());
|
wxCFRef<CFLocaleRef> userLocaleRef(CFLocaleCopyCurrent());
|
||||||
|
|
||||||
// because the locale identifier (kCFLocaleIdentifier) is formatted a little bit differently, eg
|
// because the locale identifier (kCFLocaleIdentifier) is formatted a little bit differently, eg
|
||||||
|
@@ -965,6 +965,7 @@ outlineView:(NSOutlineView*)outlineView
|
|||||||
delete[] dataFormats;
|
delete[] dataFormats;
|
||||||
delete itemObject;
|
delete itemObject;
|
||||||
if (dataStringAvailable)
|
if (dataStringAvailable)
|
||||||
|
{
|
||||||
if (itemStringAvailable)
|
if (itemStringAvailable)
|
||||||
{
|
{
|
||||||
if (itemCounter > 0)
|
if (itemCounter > 0)
|
||||||
@@ -973,6 +974,7 @@ outlineView:(NSOutlineView*)outlineView
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
dataStringAvailable = false;
|
dataStringAvailable = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1701,7 +1703,7 @@ outlineView:(NSOutlineView*)outlineView
|
|||||||
NSArray* sortDescriptors;
|
NSArray* sortDescriptors;
|
||||||
NSSortDescriptor* sortDescriptor;
|
NSSortDescriptor* sortDescriptor;
|
||||||
|
|
||||||
sortDescriptor = [[NSSortDescriptor alloc] initWithKey:[NSString stringWithFormat:@"%d",[outlineView columnWithIdentifier:[tableColumn identifier]]]
|
sortDescriptor = [[NSSortDescriptor alloc] initWithKey:[NSString stringWithFormat:@"%ld",(long)[outlineView columnWithIdentifier:[tableColumn identifier]]]
|
||||||
ascending:YES];
|
ascending:YES];
|
||||||
sortDescriptors = [NSArray arrayWithObject:sortDescriptor];
|
sortDescriptors = [NSArray arrayWithObject:sortDescriptor];
|
||||||
[tableColumn setSortDescriptorPrototype:sortDescriptor];
|
[tableColumn setSortDescriptorPrototype:sortDescriptor];
|
||||||
|
@@ -299,8 +299,8 @@ public:
|
|||||||
}
|
}
|
||||||
virtual void Replace(long from, long to, const wxString& text)
|
virtual void Replace(long from, long to, const wxString& text)
|
||||||
{
|
{
|
||||||
SetTargetStart(from);
|
SetTargetStart((int)from);
|
||||||
SetTargetEnd(to);
|
SetTargetEnd((int)to);
|
||||||
ReplaceTarget(text);
|
ReplaceTarget(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -321,7 +321,7 @@ public:
|
|||||||
|
|
||||||
virtual void SetInsertionPoint(long pos)
|
virtual void SetInsertionPoint(long pos)
|
||||||
{
|
{
|
||||||
SetCurrentPos(pos == -1 ? GetLastPosition() : pos);
|
SetCurrentPos(int(pos == -1 ? GetLastPosition() : pos));
|
||||||
}
|
}
|
||||||
virtual long GetInsertionPoint() const { return GetCurrentPos(); }
|
virtual long GetInsertionPoint() const { return GetCurrentPos(); }
|
||||||
virtual long GetLastPosition() const { return GetTextLength(); }
|
virtual long GetLastPosition() const { return GetTextLength(); }
|
||||||
@@ -334,8 +334,8 @@ public:
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetSelectionStart(from);
|
SetSelectionStart((int)from);
|
||||||
SetSelectionEnd(to);
|
SetSelectionEnd((int)to);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -361,9 +361,9 @@ public:
|
|||||||
long f, t;
|
long f, t;
|
||||||
GetSelection(&f, &t);
|
GetSelection(&f, &t);
|
||||||
if ( from )
|
if ( from )
|
||||||
*from = f;
|
*from = (int)f;
|
||||||
if ( to )
|
if ( to )
|
||||||
*to = t;
|
*to = (int)t;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -415,14 +415,14 @@ public:
|
|||||||
|
|
||||||
virtual long XYToPosition(long x, long y) const
|
virtual long XYToPosition(long x, long y) const
|
||||||
{
|
{
|
||||||
long pos = PositionFromLine(y);
|
long pos = PositionFromLine((int)y);
|
||||||
pos += x;
|
pos += x;
|
||||||
return pos;
|
return pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool PositionToXY(long pos, long *x, long *y) const
|
virtual bool PositionToXY(long pos, long *x, long *y) const
|
||||||
{
|
{
|
||||||
long l = LineFromPosition(pos);
|
int l = LineFromPosition((int)pos);
|
||||||
if ( l == -1 )
|
if ( l == -1 )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@@ -435,7 +435,7 @@ public:
|
|||||||
return true;
|
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
|
// FIXME-VC6: can't use wxWindow here because of "error C2603: illegal
|
||||||
// access declaration: 'wxWindow' is not a direct base of
|
// access declaration: 'wxWindow' is not a direct base of
|
||||||
|
Reference in New Issue
Block a user