Skip to content

Commit

Permalink
Make string literal explicit in Cpp code
Browse files Browse the repository at this point in the history
  • Loading branch information
thomvolker committed May 29, 2024
1 parent 7bb6522 commit 922a881
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/spectral.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ List spectral_dre(const arma::mat& dist_nu,

for (int sig = 0; sig < nsigma; sig++) {
if(Progress::check_abort()) {
if (progressbar) Rprintf("\n");
if (progressbar) Rprintf("%s", "\n");
Rcpp::stop("User terminated execution.");
R_FlushConsole();
} else {
Expand Down
4 changes: 2 additions & 2 deletions src/ulsif.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ List compute_ulsif(const arma::mat& dist_nu, const arma::mat& dist_de, const arm
#else
if (parallel) {
std::string warn = "OpenMP is not available, parallel processing is disabled.";
Rf_warningcall(R_NilValue, warn.c_str());
Rf_warningcall(R_NilValue, "%s", warn.c_str());
}
#endif
Progress p(nsigma * nlambda, progressbar);
Expand All @@ -117,7 +117,7 @@ List compute_ulsif(const arma::mat& dist_nu, const arma::mat& dist_de, const arm
}
if (stopped) {
if (progressbar) {
Rprintf("\n");
Rprintf("%s", "\n");
}
Rcpp::stop("User terminated execution.");
R_FlushConsole();
Expand Down

0 comments on commit 922a881

Please sign in to comment.