Commit adc4d682 authored by Davis King's avatar Davis King

Made code work in C++03 and fixed a linker error

parent 878ded28
...@@ -23,11 +23,11 @@ namespace dlib ...@@ -23,11 +23,11 @@ namespace dlib
UNKNOWN UNKNOWN
}; };
type read_type(const std::string& fileName) inline type read_type(const std::string& file_name)
{ {
std::ifstream file(fileName, std::ios::in|std::ios::binary); std::ifstream file(file_name.c_str(), std::ios::in|std::ios::binary);
if (!file) if (!file)
throw image_load_error("Unable to open file: " + fileName); throw image_load_error("Unable to open file: " + file_name);
char buffer[9]; char buffer[9];
file.read((char*)buffer, 8); file.read((char*)buffer, 8);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment