Skip to content

Commit

Permalink
SIZE_MAX instead of "SIZE_T_MAX"...
Browse files Browse the repository at this point in the history
... which is not standard and does not exist in Visual C++.
  • Loading branch information
ruevs committed Apr 15, 2024
1 parent afd74fd commit 4f8984b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/constrainteq.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ void ConstraintBase::Generate(IdList<Param,hParam> *l) {
size_t eqpos = expression.find_first_of("=");
ssassert(eqpos == expression.find_last_of("="), "There is at most one equals sign in the relation \"expression\"");
ssassert(eqpos != std::string::npos, "There is at least one equals sign in the relation \"expression\"");
Expr::From(expression.substr(0, eqpos), false, &SK.param, NULL)->Minus(Expr::From(expression.substr(eqpos+1, SIZE_T_MAX), false, &SK.param, NULL));
Expr::From(expression.substr(0, eqpos), false, &SK.param, NULL)->Minus(Expr::From(expression.substr(eqpos+1, SIZE_MAX), false, &SK.param, NULL));
} else if(expression != "" && expr_scaling_to_base != 0) {
Expr::From(expression.c_str(), false, l, NULL)->Times(Expr::From(std::to_string(expr_scaling_to_base).c_str(), false, l, NULL));
} else if(expression != "") {
Expand Down Expand Up @@ -290,7 +290,7 @@ void ConstraintBase::GenerateEquations(IdList<Equation,hEquation> *l,
} else {
if(type == Constraint::Type::RELATION) {
size_t eqpos = expression.find_first_of("=");
exA = Expr::From(expression.substr(0, eqpos), false, &SK.param, NULL)->Minus(Expr::From(expression.substr(eqpos+1, SIZE_T_MAX), false, &SK.param, NULL));
exA = Expr::From(expression.substr(0, eqpos), false, &SK.param, NULL)->Minus(Expr::From(expression.substr(eqpos+1, SIZE_MAX), false, &SK.param, NULL));
} else if(expression != "" && expr_scaling_to_base != 0) {
exA = Expr::From(expression.c_str(), false, &SK.param, NULL)->Times(Expr::From(std::to_string(expr_scaling_to_base).c_str(), false, &SK.param, NULL));
} else if(expression != "") {
Expand Down
2 changes: 1 addition & 1 deletion src/mouse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1493,7 +1493,7 @@ void GraphicsWindow::EditControlDone(const std::string &s) {
}

// (left_side) - (right_side) (... implicitly = 0)
e = Expr::From(s.substr(0, eqpos), true, &SK.param, &usedParams)->Minus(Expr::From(s.substr(eqpos+1, SIZE_T_MAX), true, &SK.param, &usedParams));
e = Expr::From(s.substr(0, eqpos), true, &SK.param, &usedParams)->Minus(Expr::From(s.substr(eqpos+1, SIZE_MAX), true, &SK.param, &usedParams));

} else {
e = Expr::From(s, true, &SK.param, &usedParams);
Expand Down

0 comments on commit 4f8984b

Please sign in to comment.