Skip to content

Commit

Permalink
Merge pull request #1069 from xhochy/clang
Browse files Browse the repository at this point in the history
Explicitly call abs as a function in DataFrame.h
  • Loading branch information
eddelbuettel authored Apr 15, 2020
2 parents cefedb7 + 687a4a6 commit a80908f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2020-04-15 Uwe Korn <mail@uwekorn.com>

* inst/include/Rcpp/DataFrame.h: Explicit call to scalar std::abs

2020-04-11 Dirk Eddelbuettel <edd@debian.org>

* DESCRIPTION (Version, Date): Roll minor version
Expand Down
2 changes: 1 addition & 1 deletion inst/include/Rcpp/DataFrame.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ namespace Rcpp{
if (Rf_isNull(rn))
return 0;
if (TYPEOF(rn) == INTSXP && LENGTH(rn) == 2 && INTEGER(rn)[0] == NA_INTEGER)
return abs(INTEGER(rn)[1]);
return std::abs(INTEGER(rn)[1]);
return LENGTH(rn);
}

Expand Down

0 comments on commit a80908f

Please sign in to comment.