Corrected a verification test
This commit is contained in:
parent
83c115d78a
commit
653d2bd99a
1 changed files with 3 additions and 1 deletions
|
|
@ -375,6 +375,7 @@ commodity_t::find_price(const optional<commodity_t&>& commodity,
|
||||||
optional<base_t::time_and_commodity_t> pair;
|
optional<base_t::time_and_commodity_t> pair;
|
||||||
#if defined(VERIFY_ON)
|
#if defined(VERIFY_ON)
|
||||||
optional<price_point_t> checkpoint;
|
optional<price_point_t> checkpoint;
|
||||||
|
bool found = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (! nested) {
|
if (! nested) {
|
||||||
|
|
@ -394,6 +395,7 @@ commodity_t::find_price(const optional<commodity_t&>& commodity,
|
||||||
<< ((*i).second ? (*i).second->price : amount_t(0L)));
|
<< ((*i).second ? (*i).second->price : amount_t(0L)));
|
||||||
#if defined(VERIFY_ON)
|
#if defined(VERIFY_ON)
|
||||||
IF_VERIFY() {
|
IF_VERIFY() {
|
||||||
|
found = true;
|
||||||
checkpoint = (*i).second;
|
checkpoint = (*i).second;
|
||||||
} else
|
} else
|
||||||
#endif // defined(VERIFY_ON)
|
#endif // defined(VERIFY_ON)
|
||||||
|
|
@ -422,7 +424,7 @@ commodity_t::find_price(const optional<commodity_t&>& commodity,
|
||||||
const_cast<commodity_t&>(*this).drop_flags(COMMODITY_WALKED);
|
const_cast<commodity_t&>(*this).drop_flags(COMMODITY_WALKED);
|
||||||
|
|
||||||
#if defined(VERIFY_ON)
|
#if defined(VERIFY_ON)
|
||||||
if (DO_VERIFY() && pair) {
|
if (DO_VERIFY() && found) {
|
||||||
VERIFY(checkpoint == point);
|
VERIFY(checkpoint == point);
|
||||||
return checkpoint;
|
return checkpoint;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue