+ don't pass std::ios::modes to memory_mapped_file

This commit is contained in:
Artem Pavlenko 2009-07-08 23:54:45 +00:00
parent eb6a0afffe
commit 867799a88c
2 changed files with 12 additions and 2 deletions

View file

@ -42,7 +42,11 @@ dbf_file::dbf_file(std::string const& file_name)
:num_records_(0), :num_records_(0),
num_fields_(0), num_fields_(0),
record_length_(0), record_length_(0),
#ifdef SHAPE_MEMORY_MAPPED_FILE
file_(file_name),
#else
file_(file_name,std::ios::in | std::ios::binary), file_(file_name,std::ios::in | std::ios::binary),
#endif
record_(0) record_(0)
{ {
if (file_.is_open()) if (file_.is_open())

View file

@ -147,7 +147,13 @@ public:
shape_file() {} shape_file() {}
shape_file(std::string const& file_name) shape_file(std::string const& file_name)
: file_(file_name,std::ios::in | std::ios::binary) {} :
#ifdef SHAPE_MEMORY_MAPPED_FILE
file_(file_name)
#else
file_(file_name,std::ios::in | std::ios::binary)
#endif
{}
~shape_file() {} ~shape_file() {}