Skip to content

Commit a1cbc45

Browse files
chestnykhdbabokin
authored andcommitted
Fix compilation error.
With `-Werror` gcc-14.1.1 (with libstdc++-14) emits an error: `error: ignoring return value of _FIter std::remove_if(_FIter, _FIter, _Predicate) ... ... declared with attribute nodiscard [-Werror=unused-result]`. Use cast to `void` to avoid it.
1 parent 0bfbe4f commit a1cbc45

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/gen_policy.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ void GenPolicy::uniformProbFromMax(std::vector<Probability<T>> &distr,
537537

538538
template <class T, class U>
539539
void GenPolicy::removeProbability(std::vector<Probability<T>> &orig, U id) {
540-
std::remove_if(
540+
(void)std::remove_if(
541541
orig.begin(), orig.end(),
542542
[&id](Probability<T> &elem) -> bool { return elem.getId() == id; });
543543
}

0 commit comments

Comments
 (0)