Whitespace fix

This commit is contained in:
John Wiegley 2012-03-30 04:45:51 -05:00
parent 931d6ff3f4
commit df1cbc33d1

View file

@ -395,11 +395,11 @@ int amount_t::compare(const amount_t& amt) const
throw_(amount_error, _("Cannot compare two uninitialized amounts"));
}
if (has_commodity() && amt.has_commodity() &&
commodity() != amt.commodity())
if (has_commodity() && amt.has_commodity() && commodity() != amt.commodity()) {
throw_(amount_error,
_("Cannot compare amounts with different commodities: '%1' and '%2'")
<< commodity() << amt.commodity());
}
return mpq_cmp(MP(quantity), MP(amt.quantity));
}
@ -460,11 +460,11 @@ amount_t& amount_t::operator-=(const amount_t& amt)
throw_(amount_error, _("Cannot subtract two uninitialized amounts"));
}
if (has_commodity() && amt.has_commodity() &&
commodity() != amt.commodity())
if (has_commodity() && amt.has_commodity() && commodity() != amt.commodity()) {
throw_(amount_error,
_("Subtracting amounts with different commodities: '%1' != '%2'")
<< commodity() << amt.commodity());
}
_dup();