mirror of
https://github.com/dlang/phobos.git
synced 2025-04-27 21:51:40 +03:00
remove pointless variable t
This commit is contained in:
parent
bc250abbb8
commit
d75ad32c89
1 changed files with 3 additions and 4 deletions
|
@ -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];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue