Warning fix.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37901 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba 2006-03-08 16:34:47 +00:00
parent f355f03e63
commit d35ad26eee
2 changed files with 22 additions and 34 deletions

View File

@ -108,7 +108,7 @@ void Font::Create(const char *faceName, int characterSet, int size, bool bold, b
// so we adjust the encoding before passing it to Scintilla. See also // so we adjust the encoding before passing it to Scintilla. See also
// wxStyledTextCtrl::StyleSetCharacterSet // wxStyledTextCtrl::StyleSetCharacterSet
wxFontEncoding encoding = (wxFontEncoding)(characterSet-1); wxFontEncoding encoding = (wxFontEncoding)(characterSet-1);
wxFontEncodingArray ea = wxEncodingConverter::GetPlatformEquivalents(encoding); wxFontEncodingArray ea = wxEncodingConverter::GetPlatformEquivalents(encoding);
if (ea.GetCount()) if (ea.GetCount())
encoding = ea[0]; encoding = ea[0];
@ -667,7 +667,7 @@ END_EVENT_TABLE()
#if wxUSE_POPUPWIN //----------------------------------- #if wxUSE_POPUPWIN //-----------------------------------
#include <wx/popupwin.h> #include <wx/popupwin.h>
@ -677,9 +677,9 @@ END_EVENT_TABLE()
// implement wxPopupWindow for the Mac!!) // implement wxPopupWindow for the Mac!!)
// //
// In the meantime, be careful to duplicate any changes as needed... // In the meantime, be careful to duplicate any changes as needed...
// //
// A popup window to place the wxSTCListBox upon // A popup window to place the wxSTCListBox upon
class wxSTCListBoxWin : public wxPopupWindow class wxSTCListBoxWin : public wxPopupWindow
{ {
private: private:
@ -687,7 +687,7 @@ private:
CallBackAction doubleClickAction; CallBackAction doubleClickAction;
void* doubleClickActionData; void* doubleClickActionData;
public: public:
wxSTCListBoxWin(wxWindow* parent, wxWindowID id, Point location) : wxSTCListBoxWin(wxWindow* parent, wxWindowID id, Point WXUNUSED(location)) :
wxPopupWindow(parent, wxBORDER_NONE) wxPopupWindow(parent, wxBORDER_NONE)
{ {
SetBackgroundColour(*wxBLACK); // for our simple border SetBackgroundColour(*wxBLACK); // for our simple border
@ -703,7 +703,7 @@ public:
// "right" to the user. But since the wxPopupWindow or its children // "right" to the user. But since the wxPopupWindow or its children
// can't receive focus then we have to pull a fast one and temporarily // can't receive focus then we have to pull a fast one and temporarily
// parent the listctrl on the STC window and then call SetFocus and // parent the listctrl on the STC window and then call SetFocus and
// then reparent it back to the popup. // then reparent it back to the popup.
lv->SetFocus(); lv->SetFocus();
lv->Reparent(this); lv->Reparent(this);
#ifdef __WXMSW__ #ifdef __WXMSW__
@ -794,7 +794,7 @@ BEGIN_EVENT_TABLE(wxSTCListBoxWin, wxPopupWindow)
EVT_LIST_ITEM_ACTIVATED(wxID_ANY, wxSTCListBoxWin::OnActivate) EVT_LIST_ITEM_ACTIVATED(wxID_ANY, wxSTCListBoxWin::OnActivate)
END_EVENT_TABLE() END_EVENT_TABLE()
#else // wxUSE_POPUPWIN ----------------------------------- #else // wxUSE_POPUPWIN -----------------------------------
@ -882,7 +882,7 @@ public:
return rv; return rv;
} }
#endif #endif
void OnActivate(wxListEvent& WXUNUSED(event)) { void OnActivate(wxListEvent& WXUNUSED(event)) {
doubleClickAction(doubleClickActionData); doubleClickAction(doubleClickActionData);
} }
@ -1055,7 +1055,7 @@ void ListBoxImpl::Append(const wxString& text, int type) {
long count = GETLB(id)->GetItemCount(); long count = GETLB(id)->GetItemCount();
long itemID = GETLB(id)->InsertItem(count, wxEmptyString); long itemID = GETLB(id)->InsertItem(count, wxEmptyString);
GETLB(id)->SetItem(itemID, 1, text); GETLB(id)->SetItem(itemID, 1, text);
maxStrWidth = wxMax(maxStrWidth, text.Length()); maxStrWidth = wxMax(maxStrWidth, text.length());
if (type != -1) { if (type != -1) {
wxCHECK_RET(imgTypeMap, wxT("Unexpected NULL imgTypeMap")); wxCHECK_RET(imgTypeMap, wxT("Unexpected NULL imgTypeMap"));
long idx = imgTypeMap->Item(type); long idx = imgTypeMap->Item(type);
@ -1065,7 +1065,7 @@ void ListBoxImpl::Append(const wxString& text, int type) {
void ListBoxImpl::SetList(const char* list, char separator, char typesep) { void ListBoxImpl::SetList(const char* list, char separator, char typesep) {
GETLB(id)->Freeze(); GETLB(id)->Freeze();
Clear(); Clear();
wxStringTokenizer tkzr(stc2wx(list), (wxChar)separator); wxStringTokenizer tkzr(stc2wx(list), (wxChar)separator);
while ( tkzr.HasMoreTokens() ) { while ( tkzr.HasMoreTokens() ) {
wxString token = tkzr.GetNextToken(); wxString token = tkzr.GetNextToken();
@ -1396,9 +1396,3 @@ const wxWX2MBbuf wx2stc(const wxString& str)
} }
#endif #endif

View File

@ -108,7 +108,7 @@ void Font::Create(const char *faceName, int characterSet, int size, bool bold, b
// so we adjust the encoding before passing it to Scintilla. See also // so we adjust the encoding before passing it to Scintilla. See also
// wxStyledTextCtrl::StyleSetCharacterSet // wxStyledTextCtrl::StyleSetCharacterSet
wxFontEncoding encoding = (wxFontEncoding)(characterSet-1); wxFontEncoding encoding = (wxFontEncoding)(characterSet-1);
wxFontEncodingArray ea = wxEncodingConverter::GetPlatformEquivalents(encoding); wxFontEncodingArray ea = wxEncodingConverter::GetPlatformEquivalents(encoding);
if (ea.GetCount()) if (ea.GetCount())
encoding = ea[0]; encoding = ea[0];
@ -667,7 +667,7 @@ END_EVENT_TABLE()
#if wxUSE_POPUPWIN //----------------------------------- #if wxUSE_POPUPWIN //-----------------------------------
#include <wx/popupwin.h> #include <wx/popupwin.h>
@ -677,9 +677,9 @@ END_EVENT_TABLE()
// implement wxPopupWindow for the Mac!!) // implement wxPopupWindow for the Mac!!)
// //
// In the meantime, be careful to duplicate any changes as needed... // In the meantime, be careful to duplicate any changes as needed...
// //
// A popup window to place the wxSTCListBox upon // A popup window to place the wxSTCListBox upon
class wxSTCListBoxWin : public wxPopupWindow class wxSTCListBoxWin : public wxPopupWindow
{ {
private: private:
@ -687,7 +687,7 @@ private:
CallBackAction doubleClickAction; CallBackAction doubleClickAction;
void* doubleClickActionData; void* doubleClickActionData;
public: public:
wxSTCListBoxWin(wxWindow* parent, wxWindowID id, Point location) : wxSTCListBoxWin(wxWindow* parent, wxWindowID id, Point WXUNUSED(location)) :
wxPopupWindow(parent, wxBORDER_NONE) wxPopupWindow(parent, wxBORDER_NONE)
{ {
SetBackgroundColour(*wxBLACK); // for our simple border SetBackgroundColour(*wxBLACK); // for our simple border
@ -703,7 +703,7 @@ public:
// "right" to the user. But since the wxPopupWindow or its children // "right" to the user. But since the wxPopupWindow or its children
// can't receive focus then we have to pull a fast one and temporarily // can't receive focus then we have to pull a fast one and temporarily
// parent the listctrl on the STC window and then call SetFocus and // parent the listctrl on the STC window and then call SetFocus and
// then reparent it back to the popup. // then reparent it back to the popup.
lv->SetFocus(); lv->SetFocus();
lv->Reparent(this); lv->Reparent(this);
#ifdef __WXMSW__ #ifdef __WXMSW__
@ -794,7 +794,7 @@ BEGIN_EVENT_TABLE(wxSTCListBoxWin, wxPopupWindow)
EVT_LIST_ITEM_ACTIVATED(wxID_ANY, wxSTCListBoxWin::OnActivate) EVT_LIST_ITEM_ACTIVATED(wxID_ANY, wxSTCListBoxWin::OnActivate)
END_EVENT_TABLE() END_EVENT_TABLE()
#else // wxUSE_POPUPWIN ----------------------------------- #else // wxUSE_POPUPWIN -----------------------------------
@ -882,7 +882,7 @@ public:
return rv; return rv;
} }
#endif #endif
void OnActivate(wxListEvent& WXUNUSED(event)) { void OnActivate(wxListEvent& WXUNUSED(event)) {
doubleClickAction(doubleClickActionData); doubleClickAction(doubleClickActionData);
} }
@ -1055,7 +1055,7 @@ void ListBoxImpl::Append(const wxString& text, int type) {
long count = GETLB(id)->GetItemCount(); long count = GETLB(id)->GetItemCount();
long itemID = GETLB(id)->InsertItem(count, wxEmptyString); long itemID = GETLB(id)->InsertItem(count, wxEmptyString);
GETLB(id)->SetItem(itemID, 1, text); GETLB(id)->SetItem(itemID, 1, text);
maxStrWidth = wxMax(maxStrWidth, text.Length()); maxStrWidth = wxMax(maxStrWidth, text.length());
if (type != -1) { if (type != -1) {
wxCHECK_RET(imgTypeMap, wxT("Unexpected NULL imgTypeMap")); wxCHECK_RET(imgTypeMap, wxT("Unexpected NULL imgTypeMap"));
long idx = imgTypeMap->Item(type); long idx = imgTypeMap->Item(type);
@ -1065,7 +1065,7 @@ void ListBoxImpl::Append(const wxString& text, int type) {
void ListBoxImpl::SetList(const char* list, char separator, char typesep) { void ListBoxImpl::SetList(const char* list, char separator, char typesep) {
GETLB(id)->Freeze(); GETLB(id)->Freeze();
Clear(); Clear();
wxStringTokenizer tkzr(stc2wx(list), (wxChar)separator); wxStringTokenizer tkzr(stc2wx(list), (wxChar)separator);
while ( tkzr.HasMoreTokens() ) { while ( tkzr.HasMoreTokens() ) {
wxString token = tkzr.GetNextToken(); wxString token = tkzr.GetNextToken();
@ -1396,9 +1396,3 @@ const wxWX2MBbuf wx2stc(const wxString& str)
} }
#endif #endif