Commit 16240ccf authored by Dominik Charousset's avatar Dominik Charousset

Silence conversion warning in streambuf

parent 4fac3f3b
...@@ -108,7 +108,9 @@ protected: ...@@ -108,7 +108,9 @@ protected:
this->setg(this->eback(), this->eback() + pos, this->egptr()); this->setg(this->eback(), this->eback() + pos, this->egptr());
if (put) { if (put) {
this->setp(this->pbase(), this->epptr()); this->setp(this->pbase(), this->epptr());
this->pbump(pos); CAF_ASSERT(pos >= std::numeric_limits<int>::min());
CAF_ASSERT(pos <= std::numeric_limits<int>::max());
this->pbump(static_cast<int>(pos));
} }
return pos; return pos;
} }
...@@ -150,7 +152,9 @@ protected: ...@@ -150,7 +152,9 @@ protected:
} }
new_off += off; new_off += off;
this->setp(this->pbase(), this->epptr()); this->setp(this->pbase(), this->epptr());
this->pbump(new_off); CAF_ASSERT(new_off >= std::numeric_limits<int>::min());
CAF_ASSERT(new_off <= std::numeric_limits<int>::max());
this->pbump(static_cast<int>(new_off));
} }
return new_off; return new_off;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment