MCPcopy Create free account
hub / github.com/PDAL/PDAL / close

Method close

plugins/e57/libE57Format/src/CheckedFile.cpp:664–692  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

662}
663
664void CheckedFile::close()
665{
666 if ( fd_ >= 0 )
667 {
668#if defined( _MSC_VER )
669 int result = ::_close( fd_ );
670#elif defined( __GNUC__ )
671 int result = ::close( fd_ );
672#else
673#error "no supported compiler defined"
674#endif
675 if ( result < 0 )
676 {
677 throw E57_EXCEPTION2( ErrorCloseFailed,
678 "fileName=" + fileName_ + " result=" + toString( result ) );
679 }
680
681 fd_ = -1;
682 }
683
684 if ( bufView_ != nullptr )
685 {
686 delete bufView_;
687 bufView_ = nullptr;
688
689 // WARNING: do NOT delete buffer of bufView_ because
690 // pointer is handled by user !!
691 }
692}
693
694void CheckedFile::unlink()
695{

Callers

nothing calls this directly

Calls 2

toStringFunction · 0.70
closeFunction · 0.50

Tested by

no test coverage detected