Skip to content

Commit 5174f37

Browse files
authored
Fix compilation error with min/max under certain circumstances (#1557)
* Fix misspelling in an error msg. * Fix untrapped compilation error in handling max/min (issue 1533). * Use R || instead of |.
1 parent 982383f commit 5174f37

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/nimble/R/genCpp_generateCpp.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ cppOutputNimDerivsPrependType <- function(code, symTab){
196196
for(i in seq_along(code$args)){
197197
iArg <- code$args[[i]]
198198
iName <- names(code$args)[i]
199-
if(iName == 'log' && (is.numeric(iArg) | is.logical(iArg))){
199+
if(isTRUE(iName == 'log' && (is.numeric(iArg) || is.logical(iArg)))) {
200200
logFixedString <- '_logFixed'
201201
argList[[length(argList) + 1]] <- nimGenerateCpp(iArg, symTab,
202202
asArg = TRUE)

0 commit comments

Comments
 (0)