mirror of
https://github.com/tfussell/xlnt.git
synced 2024-03-22 13:11:17 +08:00
cast literal to streampos
This commit is contained in:
parent
f5fb2238fc
commit
72c6569020
|
@ -179,14 +179,16 @@ private:
|
||||||
position_ = data_.size();
|
position_ = data_.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
return (position_ < 0 || position_ > data_.size()) ? -1 : position_;
|
return (position_ < 0 || position_ > data_.size())
|
||||||
|
? std::streampos(-1) : position_;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::streampos seekpos(std::streampos sp,
|
std::streampos seekpos(std::streampos sp,
|
||||||
std::ios_base::openmode which = std::ios_base::in | std::ios_base::out)
|
std::ios_base::openmode which = std::ios_base::in | std::ios_base::out)
|
||||||
{
|
{
|
||||||
position_ = sp;
|
position_ = sp;
|
||||||
return (position_ < 0 || position_ > data_.size()) ? -1 : position_;
|
return (position_ < 0 || position_ > data_.size())
|
||||||
|
? std::streampos(-1) : position_;
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user