pstream: fix the compile for MSVC (nw)

This commit is contained in:
Peter Ferrie 2015-09-28 20:20:15 -07:00
parent 4c15d28de4
commit 804cd541ec
2 changed files with 5 additions and 5 deletions

View File

@ -288,8 +288,8 @@ protected:
pifilestream(void *file, const bool do_close);
/* read up to n bytes from stream */
virtual unsigned vread(void *buf, unsigned n);
virtual void vseek(pos_type n);
virtual unsigned vread(void *buf, const unsigned n);
virtual void vseek(const pos_type n);
virtual pos_type vtell();
private:
@ -327,8 +327,8 @@ public:
protected:
/* read up to n bytes from stream */
virtual unsigned vread(void *buf, unsigned n);
virtual void vseek(pos_type n);
virtual unsigned vread(void *buf, const unsigned n);
virtual void vseek(const pos_type n);
virtual pos_type vtell();
private:

View File

@ -376,7 +376,7 @@ pstr_t *pstring_t<F>::salloc(int n)
stk = palloc_array(pstack_t<pstr_t *>, 17);
pstr_t *p;
unsigned sn= ((32 - countleadbits(n)) + 1) / 2;
unsigned size = sizeof(pstr_t) + (1<<(sn * 2)) + 1;
unsigned size = sizeof(pstr_t) + ((UINT64) 1<<(sn * 2)) + 1;
if (stk[sn].empty())
p = (pstr_t *) palloc_array(char, size);
else