mirror of
https://github.com/dlang/phobos.git
synced 2025-04-26 13:10:35 +03:00
Fix dscanner sugesstions in std/uri.d
This commit is contained in:
parent
c35bab6c93
commit
2196247cb2
1 changed files with 5 additions and 5 deletions
10
std/uri.d
10
std/uri.d
|
@ -65,7 +65,7 @@ private immutable ubyte[128] uri_flags = // indexed by character
|
|||
return uflags;
|
||||
})();
|
||||
|
||||
private string URI_Encode(dstring string, uint unescapedSet)
|
||||
private string URI_Encode(dstring str, uint unescapedSet)
|
||||
{
|
||||
import core.exception : OutOfMemoryError;
|
||||
import core.stdc.stdlib : alloca;
|
||||
|
@ -81,7 +81,7 @@ private string URI_Encode(dstring string, uint unescapedSet)
|
|||
uint Rlen;
|
||||
uint Rsize; // alloc'd size
|
||||
|
||||
auto len = string.length;
|
||||
immutable len = str.length;
|
||||
|
||||
R = buffer.ptr;
|
||||
Rsize = buffer.length;
|
||||
|
@ -89,7 +89,7 @@ private string URI_Encode(dstring string, uint unescapedSet)
|
|||
|
||||
for (k = 0; k != len; k++)
|
||||
{
|
||||
C = string[k];
|
||||
C = str[k];
|
||||
// if (C in unescapedSet)
|
||||
if (C < uri_flags.length && uri_flags[C] & unescapedSet)
|
||||
{
|
||||
|
@ -209,7 +209,7 @@ if (isSomeChar!Char)
|
|||
dchar* R;
|
||||
uint Rlen;
|
||||
|
||||
auto len = uri.length;
|
||||
immutable len = uri.length;
|
||||
auto s = uri.ptr;
|
||||
|
||||
// Preallocate result buffer R guaranteed to be large enough for result
|
||||
|
@ -290,7 +290,7 @@ if (isSomeChar!Char)
|
|||
if (C < uri_flags.length && uri_flags[C] & reservedSet)
|
||||
{
|
||||
// R ~= s[start .. k + 1];
|
||||
int width = (k + 1) - start;
|
||||
immutable width = (k + 1) - start;
|
||||
for (int ii = 0; ii < width; ii++)
|
||||
R[Rlen + ii] = s[start + ii];
|
||||
Rlen += width;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue