MCPcopy Create free account
hub / github.com/Kitware/VTK / CloseCurrentFile

Method CloseCurrentFile

IO/Geometry/vtkOpenFOAMReader.cxx:1821–1848  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1819 }
1820
1821 void CloseCurrentFile()
1822 {
1823 if (this->IsCompressed)
1824 {
1825 inflateEnd(&this->Z);
1826 }
1827
1828 delete[] this->Inbuf;
1829 delete[] this->Outbuf;
1830 this->Inbuf = this->Outbuf = nullptr;
1831
1832 if (this->File)
1833 {
1834#if VTK_OPENFOAM_TIME_PROFILING
1835 auto start = std::chrono::high_resolution_clock::now();
1836#endif
1837 fclose(this->File);
1838#if VTK_OPENFOAM_TIME_PROFILING
1839 auto end = std::chrono::high_resolution_clock::now();
1840 this->TimeInMicroseconds +=
1841 std::chrono::duration_cast<std::chrono::microseconds>(end - start).count();
1842#endif
1843 this->File = nullptr;
1844 }
1845 // don't reset the line number so that the last line number is
1846 // retained after close
1847 // lineNumber_ = 0;
1848 }
1849};
1850
1851//------------------------------------------------------------------------------

Callers 1

CloseMethod · 0.45

Calls 1

countMethod · 0.45

Tested by

no test coverage detected