cast literal to streampos

This commit is contained in:
Thomas Fussell 2016-10-30 20:43:47 -04:00
parent f5fb2238fc
commit 72c6569020

View File

@ -179,14 +179,16 @@ private:
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::ios_base::openmode which = std::ios_base::in | std::ios_base::out)
{
position_ = sp;
return (position_ < 0 || position_ > data_.size()) ? -1 : position_;
return (position_ < 0 || position_ > data_.size())
? std::streampos(-1) : position_;
}
private: