Skip to content

Commit

Permalink
remove pointless variable t
Browse files Browse the repository at this point in the history
  • Loading branch information
aG0aep6G committed Aug 8, 2016
1 parent bc250ab commit d75ad32
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions std/encoding.d
Original file line number Diff line number Diff line change
Expand Up @@ -2231,17 +2231,16 @@ body

auto buffer = new Unqual!Dst[s.length];
auto tmpBuffer = buffer;
const(Src)[] t = s;

while (t.length != 0)
while (s.length != 0)
{
if (tmpBuffer.length < minReservePlace)
{
size_t prevLength = buffer.length;
buffer.length += t.length + minReservePlace;
buffer.length += s.length + minReservePlace;
tmpBuffer = buffer[prevLength - tmpBuffer.length .. $];
}
EncoderInstance!(Unqual!Dst).encode(decode(t), tmpBuffer);
EncoderInstance!(Unqual!Dst).encode(decode(s), tmpBuffer);
}

r = cast(Dst[])buffer[0 .. buffer.length - tmpBuffer.length];
Expand Down

0 comments on commit d75ad32

Please sign in to comment.