We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent de81301 commit 6cec393Copy full SHA for 6cec393
FindAFactor/_find_a_factor.cpp
@@ -932,10 +932,10 @@ struct Factorizer {
932
BigInteger result = 1U;
933
std::vector<BigInteger> toStrike;
934
auto iIt = smoothNumberMap->begin();
935
- for (size_t i = 0U; i < smoothNumberMap->size(); ++i) {
+ for (size_t i = 0U; (i < smoothNumberMap->size()) && (result == 1U); ++i) {
936
boost::dynamic_bitset<size_t> &iRow = iIt->second;
937
auto jIt = iIt;
938
- for (size_t j = i + 1U; j < smoothNumberMap->size(); ++j) {
+ for (size_t j = i + 1U; (j < smoothNumberMap->size()) && (result == 1U); ++j) {
939
++jIt;
940
941
boost::dynamic_bitset<size_t> &jRow = jIt->second;
0 commit comments