Changeset: 8a1c0707f5e5 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8a1c0707f5e5
Modified Files:
        gdk/gdk_group.c
Branch: default
Log Message:

No need to test for maxgroups
when you intend to go for the maximum right away.


diffs (43 lines):

diff --git a/gdk/gdk_group.c b/gdk/gdk_group.c
--- a/gdk/gdk_group.c
+++ b/gdk/gdk_group.c
@@ -250,8 +250,7 @@ BATgroup_internal(BAT **groups, BAT **ex
                                ngrp++;
                                if (ngrp == maxgrps) {
                                        /* we need to extend extents and histo 
bats, do it once */
-                                       if ( maxgrps != BATcount(b))
-                                               maxgrps = BATcount(b);
+                                       maxgrps = BATcount(b);
                                        if (extents) {
                                                BATsetcount(en, ngrp);
                                                en = BATextend(en, maxgrps);
@@ -326,8 +325,7 @@ BATgroup_internal(BAT **groups, BAT **ex
                        /* start a new group */
                        if (ngrp == maxgrps) {
                                /* we need to extend extents and histo bats, do 
it once */
-                               if ( maxgrps != BATcount(b))
-                                       maxgrps = BATcount(b);
+                               maxgrps = BATcount(b);
                                if (extents) {
                                        BATsetcount(en, ngrp);
                                        en = BATextend(en, maxgrps);
@@ -374,8 +372,7 @@ BATgroup_internal(BAT **groups, BAT **ex
                                /* no equal found: start new group */
                                if (ngrp == maxgrps) {
                                        /* we need to extend extents and histo 
bats, do it once */
-                                       if ( maxgrps != BATcount(b))
-                                               maxgrps = BATcount(b);
+                                       maxgrps = BATcount(b);
                                        if (extents) {
                                                BATsetcount(en, ngrp);
                                                en = BATextend(en, maxgrps);
@@ -475,8 +472,7 @@ default: \
                                 * enter into hash table */
                                if (ngrp == maxgrps) {
                                        /* we need to extend extents and histo 
bats, do it at most once */
-                                       if ( maxgrps != BATcount(b))
-                                               maxgrps = BATcount(b);
+                                       maxgrps = BATcount(b);
                                        if (extents) {
                                                BATsetcount(en, ngrp);
                                                en = BATextend(en, maxgrps);
_______________________________________________
checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to