Changeset: 7800d362a3de for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/7800d362a3de
Modified Files:
        gdk/gdk.h
        gdk/gdk_atoms.c
        gdk/gdk_atoms.h
        gdk/gdk_project.c
Branch: default
Log Message:

Minor changes; removed dead code.


diffs (64 lines):

diff --git a/gdk/gdk.h b/gdk/gdk.h
--- a/gdk/gdk.h
+++ b/gdk/gdk.h
@@ -247,8 +247,6 @@ typedef size_t BUN;
 #endif
 #define BUN_MAX (BUN_NONE - 1) /* maximum allowed size of a BAT */
 
-#define ATOMextern(t)  (ATOMstorage(t) >= TYPE_str)
-
 typedef enum {
        PERSISTENT = 0,
        TRANSIENT,
diff --git a/gdk/gdk_atoms.c b/gdk/gdk_atoms.c
--- a/gdk/gdk_atoms.c
+++ b/gdk/gdk_atoms.c
@@ -299,14 +299,14 @@ ATOMname(int t)
 bool
 ATOMisdescendant(int tpe, int parent)
 {
-       int cur = -1;
+       int cur;
 
-       while (cur != tpe) {
+       do {
+               if (tpe == parent)
+                       return true;
                cur = tpe;
-               if (cur == parent)
-                       return true;
                tpe = ATOMstorage(tpe);
-       }
+       } while (cur != tpe);
        return false;
 }
 
diff --git a/gdk/gdk_atoms.h b/gdk/gdk_atoms.h
--- a/gdk/gdk_atoms.h
+++ b/gdk/gdk_atoms.h
@@ -278,6 +278,7 @@ gdk_export const inet6 inet6_nil;
 #define ATOMvarsized(t)                (BATatoms[t].atomPut != NULL)
 #define ATOMlinear(t)          BATatoms[t].linear
 #define ATOMtype(t)            ((t) == TYPE_void ? TYPE_oid : (t))
+#define ATOMextern(t)          (ATOMstorage(t) >= TYPE_str)
 
 /* The base type is the storage type if the comparison function, the
  * hash function, and the nil value are the same as those of the
diff --git a/gdk/gdk_project.c b/gdk/gdk_project.c
--- a/gdk/gdk_project.c
+++ b/gdk/gdk_project.c
@@ -460,14 +460,6 @@ BATproject2(BAT *restrict l, BAT *restri
                        tpe = r1i.width == 1 ? TYPE_bte : (r1i.width == 2 ? 
TYPE_sht : (r1i.width == 4 ? TYPE_int : TYPE_lng));
                        vheaptrick = true;
                }
-       } else if (ATOMvarsized(tpe) &&
-                  li.nonil &&
-                  r2 == NULL &&
-                  (r1i.count == 0 ||
-                   lcount > (r1i.count >> 3) ||
-                   r1i.restricted == BAT_READ)) {
-               tpe = r1i.width == 4 ? TYPE_int : TYPE_lng;
-               vheaptrick = true;
        } else if (tpe == TYPE_msk || mask_cand(r1)) {
                r1 = BATunmask(r1);
                if (r1 == NULL)
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to