comparison Core/Images/PngReader.cpp @ 2017:08ce34cfacad

refactoring
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 13 Jun 2016 15:49:10 +0200
parents 56276bad7e42
children aa4b8895cd23
comparison
equal deleted inserted replaced
2016:0ae26237569a 2017:08ce34cfacad
47 { 47 {
48 FILE* fp_; 48 FILE* fp_;
49 49
50 FileRabi(const char* filename) 50 FileRabi(const char* filename)
51 { 51 {
52 fp_ = fopen(filename, "rb"); 52 fp_ = Toolbox::OpenFile(filename, FileMode_ReadBinary);
53 if (!fp_) 53 if (!fp_)
54 { 54 {
55 throw OrthancException(ErrorCode_InexistentFile); 55 throw OrthancException(ErrorCode_InexistentFile);
56 } 56 }
57 } 57 }
58 58
59 ~FileRabi() 59 ~FileRabi()
60 { 60 {
61 if (fp_) 61 if (fp_)
62 {
62 fclose(fp_); 63 fclose(fp_);
64 }
63 } 65 }
64 }; 66 };
65 } 67 }
66 68
67 69