Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Pascal Führlich <[email protected]>
  • Loading branch information
tscheypidi and pfuehrlich-pik authored Jun 29, 2023
1 parent 010c84a commit 2bd0cfe
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions R/magpie-class.R
Original file line number Diff line number Diff line change
Expand Up @@ -369,11 +369,10 @@ setMethod("[<-", # nolint
if (missing(j)) jj <- seq_len(dim(x)[2]) else jj <- j
if (missing(k)) kk <- seq_len(dim(x)[3]) else kk <- k
value <- magpie_expand(value, x[ii, jj, kk])
} else if (length(value) != length(x@.Data[i, j, k]) & length(value) != 1) {
} else if (length(value) != length(x@.Data[i, j, k]) && length(value) != 1) {
# dangerous writing of value as order might be wrong!
stop("Replacement does not work! Different replacement length!")
} else if (length(value) != 1 && !is.null(getOption("magclass.verbosity")) &&
getOption("magclass.verbosity") > 1) {
} else if (length(value) != 1 && getOption("magclass.verbosity", default = 0) > 1) {
message("NOTE ([<-): Dangerous replacement! As replacement value is not",
" an MAgPIE object name checking is deactivated!\n")
}
Expand Down

0 comments on commit 2bd0cfe

Please sign in to comment.