savepos.cpp 288 B

12345678910111213141516
  1. #include "rar.hpp"
  2. SaveFilePos::SaveFilePos(File &SaveFile)
  3. {
  4. SaveFilePos::SaveFile=&SaveFile;
  5. SavePos=SaveFile.Tell();
  6. CloseCount=SaveFile.CloseCount;
  7. }
  8. SaveFilePos::~SaveFilePos()
  9. {
  10. if (CloseCount==SaveFile->CloseCount)
  11. SaveFile->Seek(SavePos,SEEK_SET);
  12. }