+ avoid implicit conversion by passing expected types to read_intxx_{ndr,xdr}
( msvc compiler generates an error otherwise )
This commit is contained in:
parent
e5ac14a236
commit
5d193947ae
3 changed files with 7 additions and 7 deletions
|
@ -42,7 +42,7 @@ dbf_file::dbf_file(std::string const& file_name)
|
|||
:num_records_(0),
|
||||
num_fields_(0),
|
||||
record_length_(0),
|
||||
file_(file_name),
|
||||
file_(file_name,std::ios::binary),
|
||||
record_(0)
|
||||
{
|
||||
if (file_.is_open())
|
||||
|
|
|
@ -94,7 +94,7 @@ struct shape_record
|
|||
|
||||
int read_ndr_integer()
|
||||
{
|
||||
int val;
|
||||
boost::int32_t val;
|
||||
read_int32_ndr(&data[pos],val);
|
||||
pos+=4;
|
||||
return val;
|
||||
|
@ -102,7 +102,7 @@ struct shape_record
|
|||
|
||||
int read_xdr_integer()
|
||||
{
|
||||
int val;
|
||||
boost::int32_t val;
|
||||
read_int32_xdr(&data[pos],val);
|
||||
pos+=4;
|
||||
return val;
|
||||
|
@ -147,7 +147,7 @@ public:
|
|||
shape_file() {}
|
||||
|
||||
shape_file(std::string const& file_name)
|
||||
: file_(file_name) {}
|
||||
: file_(file_name,std::ios::binary) {}
|
||||
|
||||
~shape_file() {}
|
||||
|
||||
|
@ -177,7 +177,7 @@ public:
|
|||
{
|
||||
char b[4];
|
||||
file_.read(b, 4);
|
||||
int val;
|
||||
boost::int32_t val;
|
||||
read_int32_xdr(b,val);
|
||||
return val;
|
||||
}
|
||||
|
@ -186,7 +186,7 @@ public:
|
|||
{
|
||||
char b[4];
|
||||
file_.read(b,4);
|
||||
int val;
|
||||
boost::int32_t val;
|
||||
read_int32_ndr(b,val);
|
||||
return val;
|
||||
}
|
||||
|
|
|
@ -152,7 +152,7 @@ namespace mapnik
|
|||
|
||||
int read_integer()
|
||||
{
|
||||
int n;
|
||||
boost::int32_t n;
|
||||
if (needSwap_)
|
||||
{
|
||||
read_int32_xdr(wkb_+pos_,n);
|
||||
|
|
Loading…
Reference in a new issue