Skip to content

Commit

Permalink
Use methods::is instead of class() & comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
asardaes committed Sep 24, 2022
1 parent 3078a23 commit 3768776
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ importFrom(graphics,plot)
importFrom(methods,S3Part)
importFrom(methods,callNextMethod)
importFrom(methods,initialize)
importFrom(methods,is)
importFrom(methods,new)
importFrom(methods,setClass)
importFrom(methods,setGeneric)
Expand Down
3 changes: 2 additions & 1 deletion R/S4-Distmat.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#'
#' Reference class that is used internally for cross-distance matrices.
#'
#' @importFrom methods is
#' @importFrom methods setRefClass
#'
#' @field distmat A distance matrix.
Expand Down Expand Up @@ -37,7 +38,7 @@ Distmat <- methods::setRefClass("Distmat",
trace = FALSE,
diff_lengths = different_lengths(series),
silent = FALSE)
if (class(control) != "PtCtrl")
if (!methods::is(control, "PtCtrl"))
stop("Invalid control provided.") # nocov
}
# need another dist closure, otherwise it would be recursive
Expand Down
2 changes: 1 addition & 1 deletion cran-comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Specify minimum Matrix version as suggested by their maintainers, and documentat
* GitHub CI
+ Linux: devel and release
+ OSX: release
+ Windows: release (x32 and x64)
+ Windows: release

## R CMD check results
* There were no ERRORs or WARNINGs
Expand Down

0 comments on commit 3768776

Please sign in to comment.