+ don't pass std::ios::modes to memory_mapped_file
This commit is contained in:
parent
eb6a0afffe
commit
867799a88c
2 changed files with 12 additions and 2 deletions
|
@ -42,7 +42,11 @@ dbf_file::dbf_file(std::string const& file_name)
|
|||
:num_records_(0),
|
||||
num_fields_(0),
|
||||
record_length_(0),
|
||||
#ifdef SHAPE_MEMORY_MAPPED_FILE
|
||||
file_(file_name),
|
||||
#else
|
||||
file_(file_name,std::ios::in | std::ios::binary),
|
||||
#endif
|
||||
record_(0)
|
||||
{
|
||||
if (file_.is_open())
|
||||
|
|
|
@ -147,8 +147,14 @@ public:
|
|||
shape_file() {}
|
||||
|
||||
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() {}
|
||||
|
||||
inline bool is_open()
|
||||
|
|
Loading…
Reference in a new issue