Patch by riccardom:
a negative integral was passed to a unsigned variable so declared it signed and casted it to unsigned when it is known to be positive (size_t vs ssize_t).
This commit is contained in:
parent
d0d974b9c7
commit
45fa0170f7
|
@ -180,7 +180,7 @@ private:
|
|||
setg(buf, buf+rp, buf + length);
|
||||
}
|
||||
|
||||
void expand(size_t upto)
|
||||
void expand(ssize_t upto)
|
||||
{
|
||||
if(!myBuf && !usevec)
|
||||
throw new std::runtime_error("memory_streambuf is not expandable");
|
||||
|
@ -189,7 +189,7 @@ private:
|
|||
if(upto == -1)
|
||||
newcapacity = capacity + capacity/2 + 2;
|
||||
else
|
||||
newcapacity = std::max(upto,capacity);
|
||||
newcapacity = std::max((size_t)upto,capacity);
|
||||
|
||||
if(newcapacity == capacity) return;
|
||||
|
||||
|
|
Loading…
Reference in New Issue