Fix obscure precondition expression

This commit is contained in:
Gabriel Dos Reis 2015-09-23 05:40:07 -07:00
parent 6a14df3e51
commit f1981f9e99

View File

@ -1094,7 +1094,7 @@ We don't need to mention it for each member function.
int area(int height, int width)
{
Expects(height>0 && width>0); // good
if (height>0 && width>0) my_error(); // obscure
if (height<=0 || width<=0) my_error(); // obscure
// ...
}