From e1bce3caeb2550d19840407f814ebe834864ff79 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 17 Sep 2005 21:02:03 +0000 Subject: [PATCH 1/1] removed unused variables and constant git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35536 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/motif/window.cpp | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/src/motif/window.cpp b/src/motif/window.cpp index bc01bf3cbb..aac080b93a 100644 --- a/src/motif/window.cpp +++ b/src/motif/window.cpp @@ -85,12 +85,6 @@ #include -// ---------------------------------------------------------------------------- -// constants -// ---------------------------------------------------------------------------- - -static const int SCROLL_MARGIN = 4; - // ---------------------------------------------------------------------------- // global variables for this module // ---------------------------------------------------------------------------- @@ -1743,18 +1737,18 @@ bool wxWindow::ProcessAccelerator(wxKeyEvent& event) bool wxAddWindowToTable(Widget w, wxWindow *win) { - wxWindow *oldItem = NULL; - if ((oldItem = (wxWindow *)wxWidgetHashTable->Get ((long) w))) + const long key = (long)w; + if ( wxWidgetHashTable->Get(key)) { wxLogDebug("Widget table clash: new widget is %ld, %s", - (long)w, win->GetClassInfo()->GetClassName()); + key, win->GetClassInfo()->GetClassName()); return false; } - wxWidgetHashTable->Put((long) w, win); + wxWidgetHashTable->Put(key, win); wxLogTrace("widget", "Widget 0x%p <-> window %p (%s)", - (WXWidget)w, win, win->GetClassInfo()->GetClassName()); + w, win, win->GetClassInfo()->GetClassName()); return true; } @@ -2157,19 +2151,15 @@ static void wxScrollBarCallback(Widget scrollbar, // For repainting arbitrary windows void wxUniversalRepaintProc(Widget w, XtPointer WXUNUSED(c_data), XEvent *event, char *) { - Window window; - Display *display; - wxWindow* win = wxGetWindowFromTable(w); if (!win) return; - switch(event -> type) + switch ( event->type ) { - case Expose: + case Expose: { - window = (Window) win -> GetXWindow(); - display = (Display *) win -> GetXDisplay(); + Display *display = (Display *) win -> GetXDisplay(); win->AddUpdateRect(event->xexpose.x, event->xexpose.y, event->xexpose.width, event->xexpose.height); -- 2.45.2