Skip to content

Commit

Permalink
mitigate g++4.8.5 bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
pcarruscag committed Jan 9, 2022
1 parent 232cccf commit 2484cd3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ namespace internal {
/// returns <true> if the conversion is successful.
template<class StringType, class NumberType>
bool ToNumber(const StringType& s, NumberType& n) {
auto ss = std::stringstream(s);
std::stringstream ss;
ss << s;
return static_cast<bool>(ss >> n);
}

Expand Down Expand Up @@ -429,7 +430,7 @@ ExpressionTree<NumberType> Parse(StringType expr, StringListType& symbols) {
std::sort(tree.nodes.begin(), tree.nodes.begin() + tree.size);

// Renumber children.
std::array<int, internal::max_tree_size> perm{};
std::array<int, internal::max_tree_size> perm;
for (int i = 0; i < internal::max_tree_size; ++i) {
perm[tree.nodes[i].index] = i;
}
Expand Down

0 comments on commit 2484cd3

Please sign in to comment.