removed unused variables and constant

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35536 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2005-09-17 21:02:03 +00:00
parent 002ceb3840
commit e1bce3caeb

View File

@@ -85,12 +85,6 @@
#include <string.h> #include <string.h>
// ----------------------------------------------------------------------------
// constants
// ----------------------------------------------------------------------------
static const int SCROLL_MARGIN = 4;
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// global variables for this module // global variables for this module
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@@ -1743,18 +1737,18 @@ bool wxWindow::ProcessAccelerator(wxKeyEvent& event)
bool wxAddWindowToTable(Widget w, wxWindow *win) bool wxAddWindowToTable(Widget w, wxWindow *win)
{ {
wxWindow *oldItem = NULL; const long key = (long)w;
if ((oldItem = (wxWindow *)wxWidgetHashTable->Get ((long) w))) if ( wxWidgetHashTable->Get(key))
{ {
wxLogDebug("Widget table clash: new widget is %ld, %s", wxLogDebug("Widget table clash: new widget is %ld, %s",
(long)w, win->GetClassInfo()->GetClassName()); key, win->GetClassInfo()->GetClassName());
return false; return false;
} }
wxWidgetHashTable->Put((long) w, win); wxWidgetHashTable->Put(key, win);
wxLogTrace("widget", "Widget 0x%p <-> window %p (%s)", wxLogTrace("widget", "Widget 0x%p <-> window %p (%s)",
(WXWidget)w, win, win->GetClassInfo()->GetClassName()); w, win, win->GetClassInfo()->GetClassName());
return true; return true;
} }
@@ -2157,19 +2151,15 @@ static void wxScrollBarCallback(Widget scrollbar,
// For repainting arbitrary windows // For repainting arbitrary windows
void wxUniversalRepaintProc(Widget w, XtPointer WXUNUSED(c_data), XEvent *event, char *) void wxUniversalRepaintProc(Widget w, XtPointer WXUNUSED(c_data), XEvent *event, char *)
{ {
Window window;
Display *display;
wxWindow* win = wxGetWindowFromTable(w); wxWindow* win = wxGetWindowFromTable(w);
if (!win) if (!win)
return; return;
switch(event -> type) switch ( event->type )
{ {
case Expose: case Expose:
{ {
window = (Window) win -> GetXWindow(); Display *display = (Display *) win -> GetXDisplay();
display = (Display *) win -> GetXDisplay();
win->AddUpdateRect(event->xexpose.x, event->xexpose.y, win->AddUpdateRect(event->xexpose.x, event->xexpose.y,
event->xexpose.width, event->xexpose.height); event->xexpose.width, event->xexpose.height);