[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-cvs: gaf.git: branch: master updated (1.5.0-20080706-401-gba14128)



The branch, master has been updated
       via  ba14128c0710a12665b07c29e74c00c55993b3d1 (commit)
      from  20e4ffcd895f344b8124ca16990f04e9570140c0 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


=========
 Summary
=========

 gschem/src/o_move.c |   42 +++++++++++++++++-------------------------
 1 files changed, 17 insertions(+), 25 deletions(-)


=================
 Commit Messages
=================

commit ba14128c0710a12665b07c29e74c00c55993b3d1
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Sat Dec 20 01:05:11 2008 +0000

    gschem: Further tidying in o_move_end_rubberband()
    
    Changes a switch statement with only one active code-path into an
    if (...) { ... } clause. Should be no functional changes.

:100644 100644 9eef304... 07294b8... M	gschem/src/o_move.c

=========
 Changes
=========

commit ba14128c0710a12665b07c29e74c00c55993b3d1
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Sat Dec 20 01:05:11 2008 +0000

    gschem: Further tidying in o_move_end_rubberband()
    
    Changes a switch statement with only one active code-path into an
    if (...) { ... } clause. Should be no functional changes.

diff --git a/gschem/src/o_move.c b/gschem/src/o_move.c
index 9eef304..07294b8 100644
--- a/gschem/src/o_move.c
+++ b/gschem/src/o_move.c
@@ -509,36 +509,28 @@ void o_move_end_rubberband (GSCHEM_TOPLEVEL *w_current,
     OBJECT *object = s_current->object;
     int whichone = s_current->whichone;
 
-    switch (object->type) {
-
-      case OBJ_NET:
-      case OBJ_BUS:
-
-        /* save the other objects and remove object's connections */
-        *prev_conn_objects =
-          s_conn_return_others (*prev_conn_objects, object);
-        s_conn_remove_object (toplevel, object);
+    if (object->type == OBJ_NET ||
+        object->type == OBJ_BUS) {
 
-        object->line->x[whichone] += w_dx;
-        object->line->y[whichone] += w_dy;
-
-        if (o_move_zero_length (object)) {
-          o_delete (w_current, object);
-          continue;
-        }
+      /* save the other objects and remove object's connections */
+      *prev_conn_objects =
+        s_conn_return_others (*prev_conn_objects, object);
+      s_conn_remove_object (toplevel, object);
 
-        o_recalc_single_object (toplevel, object);
-        s_tile_update_object (toplevel, object);
-        s_conn_update_object (toplevel, object);
-        *connected_objects = s_conn_return_others (*connected_objects, object);
-        *objects = g_list_append (*objects, object);
+      object->line->x[whichone] += w_dx;
+      object->line->y[whichone] += w_dy;
 
-        break;
+      if (o_move_zero_length (object)) {
+        o_delete (w_current, object);
+        continue;
+      }
 
-      case OBJ_PIN:
+      o_recalc_single_object (toplevel, object);
+      s_tile_update_object (toplevel, object);
+      s_conn_update_object (toplevel, object);
+      *connected_objects = s_conn_return_others (*connected_objects, object);
+      *objects = g_list_append (*objects, object);
 
-        /* NOP: not valid to do with pins */
-        break;
     }
   }
 }




_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs