Mercurial > hg > orthanc
changeset 1925:56276bad7e42
removal of two overloads making few sense
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 08 Mar 2016 16:56:34 +0100 |
parents | 6c73df12ca51 |
children | 2a129de4b5e2 |
files | Core/Images/JpegReader.cpp Core/Images/JpegReader.h Core/Images/PngReader.cpp Core/Images/PngReader.h |
diffstat | 4 files changed, 6 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/Core/Images/JpegReader.cpp Mon Mar 07 17:43:20 2016 +0100 +++ b/Core/Images/JpegReader.cpp Tue Mar 08 16:56:34 2016 +0100 @@ -93,9 +93,9 @@ } - void JpegReader::ReadFromFile(const char* filename) + void JpegReader::ReadFromFile(const std::string& filename) { - FILE* fp = fopen(filename, "rb"); + FILE* fp = fopen(filename.c_str(), "rb"); if (!fp) { throw OrthancException(ErrorCode_InexistentFile);
--- a/Core/Images/JpegReader.h Mon Mar 07 17:43:20 2016 +0100 +++ b/Core/Images/JpegReader.h Tue Mar 08 16:56:34 2016 +0100 @@ -47,12 +47,7 @@ std::string content_; public: - void ReadFromFile(const char* filename); - - void ReadFromFile(const std::string& filename) - { - ReadFromFile(filename.c_str()); - } + void ReadFromFile(const std::string& filename); void ReadFromMemory(const void* buffer, size_t size);
--- a/Core/Images/PngReader.cpp Mon Mar 07 17:43:20 2016 +0100 +++ b/Core/Images/PngReader.cpp Tue Mar 08 16:56:34 2016 +0100 @@ -204,9 +204,9 @@ AssignWritable(format, width, height, pitch, &data_[0]); } - void PngReader::ReadFromFile(const char* filename) + void PngReader::ReadFromFile(const std::string& filename) { - FileRabi f(filename); + FileRabi f(filename.c_str()); char header[8]; if (fread(header, 1, 8, f.fp_) != 8)
--- a/Core/Images/PngReader.h Mon Mar 07 17:43:20 2016 +0100 +++ b/Core/Images/PngReader.h Tue Mar 08 16:56:34 2016 +0100 @@ -59,12 +59,7 @@ public: PngReader(); - void ReadFromFile(const char* filename); - - void ReadFromFile(const std::string& filename) - { - ReadFromFile(filename.c_str()); - } + void ReadFromFile(const std::string& filename); void ReadFromMemory(const void* buffer, size_t size);