]> git.saurik.com Git - wxWidgets.git/commitdiff
removed unused variables and constant
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 17 Sep 2005 21:02:03 +0000 (21:02 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 17 Sep 2005 21:02:03 +0000 (21:02 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35536 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/motif/window.cpp

index bc01bf3cbb7f3b5092859faf5133295359319c3b..aac080b93aa92b78c9b331b7e43a59a340608299 100644 (file)
 
 #include <string.h>
 
-// ----------------------------------------------------------------------------
-// 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);