Skip to content

Commit

Permalink
Adjust Product::findMaxVaExp new return type
Browse files Browse the repository at this point in the history
  • Loading branch information
ohhmm committed Jan 27, 2024
1 parent db48cba commit a97d390
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions omnn/math/Product.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ namespace math {
}
}

int Product::findMaxVaExp()
max_exp_t Product::findMaxVaExp()
{
vaExpsSum = 0;
for (auto& i:vars) {
Expand All @@ -92,7 +92,7 @@ namespace math {
return x.second < y.second;
});
if (it != vars.end()) {
return static_cast<int>(it->second.as<Integer>());
return static_cast<max_exp_t>(it->second);
}
return 0;
}
Expand Down Expand Up @@ -120,9 +120,6 @@ namespace math {
}

auto& e = vars[va];
if (!e.IsInt()) {
IMPLEMENT
}
auto wasMax = maxVaExp == static_cast<decltype(maxVaExp)>(e);
e += exponentiation;

Expand Down
2 changes: 1 addition & 1 deletion omnn/math/Product.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class Product

Valuable getCommVal(const Product& with) const;
Valuable InCommonWith(const Valuable& v) const override;
int findMaxVaExp();
max_exp_t findMaxVaExp();
bool IsComesBefore(const Valuable& v) const override;
Valuable calcFreeMember() const override;

Expand Down

0 comments on commit a97d390

Please sign in to comment.