Skip to content

Commit

Permalink
Use Rf_isNull
Browse files Browse the repository at this point in the history
  • Loading branch information
stewid committed Nov 2, 2019
1 parent 8020699 commit 60d6932
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/trace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,19 +116,19 @@ check_arguments(const SEXP src,
const SEXP outEnd,
const SEXP numberOfIdentifiers)
{
if (R_NilValue == root
|| R_NilValue == inBegin
|| R_NilValue == inEnd
|| R_NilValue == outBegin
|| R_NilValue == outEnd
|| R_NilValue == numberOfIdentifiers
|| INTSXP != TYPEOF(root)
|| INTSXP != TYPEOF(inBegin)
|| INTSXP != TYPEOF(inEnd)
|| INTSXP != TYPEOF(outBegin)
|| INTSXP != TYPEOF(outEnd)
|| INTSXP != TYPEOF(numberOfIdentifiers)
|| 1 != LENGTH(numberOfIdentifiers))
if (Rf_isNull(root) ||
Rf_isNull(inBegin) ||
Rf_isNull(inEnd) ||
Rf_isNull(outBegin) ||
Rf_isNull(outEnd) ||
Rf_isNull(numberOfIdentifiers) ||
INTSXP != TYPEOF(root) ||
INTSXP != TYPEOF(inBegin) ||
INTSXP != TYPEOF(inEnd) ||
INTSXP != TYPEOF(outBegin) ||
INTSXP != TYPEOF(outEnd) ||
INTSXP != TYPEOF(numberOfIdentifiers) ||
1 != LENGTH(numberOfIdentifiers))
return 1;
return 0;
}
Expand Down

1 comment on commit 60d6932

@lintr-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

R/network-summary.R:262:1: style: functions should have cyclomatic complexity of less than 15, this has 38.

setMethod("NetworkSummary",
^

R/report.R:290:1: style: Lines should not be more than 80 characters.

##' @param template the Sweave template file to use. If none is provided, the default
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/shortest-paths.R:169:1: style: functions should have cyclomatic complexity of less than 15, this has 41.

setMethod("ShortestPaths",
^

R/trace.R:161:1: style: functions should have cyclomatic complexity of less than 15, this has 56.

Trace <- function(movements,
^

R/tree.R:135:1: style: functions should have cyclomatic complexity of less than 15, this has 48.

position_tree <- function(tree,
^

Please sign in to comment.