Skip to content

Commit

Permalink
Merge pull request #1 from Ilyatk/master
Browse files Browse the repository at this point in the history
Fix expected size calculation.
  • Loading branch information
babenek authored Oct 3, 2019
2 parents 0b2e951 + 6591e10 commit 1484717
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions base91.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ class base91
{
out.clear();
// reserved a bit more than necessary to avoid extra calculation
out.reserve(char_bit + (b91word_bit*in.size())/(2*char_bit));
out.reserve(char_bit + ((2 * char_bit)*in.size()) / (b91word_bit));

auto HI = new char[b91word_size];
auto LO = new char[b91word_size];
Expand Down Expand Up @@ -218,7 +218,7 @@ class base91
{
out.clear();
// reserved a bit more than necessary to avoid extra calculation
out.reserve(char_bit + (2*char_bit*in.size())/b91word_bit);
out.reserve(char_bit + (b91word_bit*in.size()) / (2 * char_bit));

auto ZYX = new char[1 << char_bit];
for (unsigned n = 0; n < (1 << char_bit); ++n)
Expand Down

0 comments on commit 1484717

Please sign in to comment.