workaround -Wmaybe-uninitialized

The init is legit as it prevents the reader to
do a useless loop and the writer to write
random number

In case of failing to read a face index or the number of faces,
the error bit in the stream is set anyway and the user has to
check it
This commit is contained in:
Sébastien Loriot 2021-11-11 15:19:28 +01:00
parent a2ae7d8e13
commit 32f40d82a7
1 changed files with 2 additions and 2 deletions

View File

@ -71,12 +71,12 @@ generic_copy_OFF(File_scanner_OFF& scanner,
if(! in)
return;
std::size_t no;
std::size_t no = 0;
scanner.scan_facet(no, i);
writer.write_facet_begin(no);
for(std::size_t j=0; j<no; ++j)
{
std::size_t index;
std::size_t index = 0;
scanner.scan_facet_vertex_index(index, j+1, i);
writer.write_facet_vertex_index(index);
}