Skip to content

Commit

Permalink
reduce conflicts to PR #4386
Browse files Browse the repository at this point in the history
  • Loading branch information
jangorecki committed Apr 18, 2020
1 parent c8e070b commit 3004748
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions src/bmerge.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,16 +164,14 @@ SEXP bmerge(SEXP iArg, SEXP xArg, SEXP icolsArg, SEXP xcolsArg, SEXP isorted, SE

// isorted arg
o = NULL;
if (!LOGICAL(isorted)[0]) { // this opt is already handled in new lazy forder, probably different PR, so leave it as is
SEXP order = PROTECT(allocVector(INTSXP, length(icolsArg))); protecti++;
for (int j=0; j<LENGTH(order); j++)
INTEGER(order)[j]=1; // rep(1L, length(icolsArg))
SEXP oSxp = PROTECT(forder(i, icolsArg, ScalarLogical(FALSE), ScalarLogical(TRUE), order, ScalarLogical(FALSE))); protecti++;
if (!LOGICAL(isorted)[0]) {
SEXP order = PROTECT(allocVector(INTSXP, length(icolsArg)));
protecti++;
for (int j=0; j<LENGTH(order); j++) INTEGER(order)[j]=1; // rep(1L, length(icolsArg))
SEXP oSxp = PROTECT(forder(i, icolsArg, ScalarLogical(FALSE), ScalarLogical(TRUE), order, ScalarLogical(FALSE)));
protecti++;
// TODO - split head of forder into C-level callable
if (!LENGTH(oSxp))
o = NULL;
else
o = INTEGER(oSxp);
if (!LENGTH(oSxp)) o = NULL; else o = INTEGER(oSxp);
}

// xo arg
Expand Down

0 comments on commit 3004748

Please sign in to comment.