Simplify loop of _in_str
This commit is contained in:
1 parent
44cdfa0c77
commit
ebfc5615fc
1 file changed
+2
-2
+2
-2
@@ -513,12 +513,12 @@ bitset_in_str(bitset_t set, FILE *file)
|
|||||||
int c = fgetc(file);
|
int c = fgetc(file);
|
||||||
if (c != '[') return false;
|
if (c != '[') return false;
|
||||||
c = fgetc(file);
|
c = fgetc(file);
|
||||||
do {
|
while (c == '0' || c == '1') {
|
||||||
if (c != '0' && c != '1') break;
|
if (c != '0' && c != '1') break;
|
||||||
const bool b = (c == '1');
|
const bool b = (c == '1');
|
||||||
bitset_push_back (set, b);
|
bitset_push_back (set, b);
|
||||||
c = fgetc(file);
|
c = fgetc(file);
|
||||||
} while (c != ']' && c != EOF);
|
}
|
||||||
BITSETI_CONTRACT (set);
|
BITSETI_CONTRACT (set);
|
||||||
return c == ']';
|
return c == ']';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user