3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-26 02:25:32 +00:00

Prefer using empty rather than size comparisons.

This commit is contained in:
Bruce Mitchener 2018-11-27 21:42:04 +07:00
parent a83097d5cc
commit e570940662
56 changed files with 104 additions and 104 deletions

View file

@ -35,7 +35,7 @@ static void tst1() {
}
else if (op <= 3) {
ENSURE(v1.size() == v2.size());
if (v1.size() > 0) {
if (!v1.empty()) {
bool val = (rand()%2) != 0;
unsigned idx = rand()%v1.size();
ENSURE(v1.get(idx) == v2[idx]);
@ -46,7 +46,7 @@ static void tst1() {
}
else if (op <= 4) {
ENSURE(v1.size() == v2.size());
if (v1.size() > 0) {
if (!v1.empty()) {
unsigned idx = rand()%v1.size();
VERIFY(v1.get(idx) == v2[idx]);
}