Skip to content

Commit

Permalink
Just cast to int, not worth it
Browse files Browse the repository at this point in the history
  • Loading branch information
richfitz committed Nov 28, 2023
1 parent c2a1430 commit a7fae7b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/GslOdeBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ GslOdeBase::r_derivs(double t_, std::vector<double> y_, SEXP pars_) {
// TODO: The call to derivs() should be wrapped in a try (or
// equivalent) so that pars are reset if the R call fails.
if (y_.size() != size())
Rf_error("Incorrect input length (expected %zu, got %zu)",
size(), y_.size());
Rf_error("Incorrect input length (expected %d, got %d)",
(int)size(), (int)y_.size());
set_pars(pars_);

std::vector<double> ret(size());
Expand Down Expand Up @@ -99,8 +99,8 @@ void GslOdeBase::set_state(double t0, const std::vector<double> y_) {
must_be_initialised();

if ( y_.size() != size() )
Rf_error("Expected 'y' of size %zu (recieved %zu)",
size(), y_.size());
Rf_error("Expected 'y' of size %d (recieved %d)",
(int)size(), (int)y_.size());
t = t0;
y = y_;

Expand Down
2 changes: 1 addition & 1 deletion src/TimeMachine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ TimeMachine::TimeMachine(std::vector<std::string> names,

void TimeMachine::set(std::vector<double> pars) {
if (pars.size() != np_in)
error("Expected %zu parameters, recieved %zu", np_in, pars.size());
error("Expected %d parameters, recieved %d", (int)np_in, (int)pars.size());
// Only go through the extra effort below if the parameters differ.
if ( pars == p_in )
return;
Expand Down

0 comments on commit a7fae7b

Please sign in to comment.