mirror of
https://github.com/dlang/phobos.git
synced 2025-04-27 13:40:20 +03:00
Make phobos compile with pure-scope fix
This commit is contained in:
parent
0411974508
commit
0eb2fb7aaa
3 changed files with 5 additions and 5 deletions
|
@ -2377,7 +2377,7 @@ Throws:
|
|||
A $(LREF ConvException) If an overflow occurred during conversion or
|
||||
if no character of the input was meaningfully converted.
|
||||
*/
|
||||
auto parse(Target, Source, Flag!"doCount" doCount = No.doCount)(ref Source s)
|
||||
auto parse(Target, Source, Flag!"doCount" doCount = No.doCount)(ref scope Source s)
|
||||
if (isSomeChar!(ElementType!Source) &&
|
||||
isIntegral!Target && !is(Target == enum))
|
||||
{
|
||||
|
@ -2482,7 +2482,7 @@ if (isSomeChar!(ElementType!Source) &&
|
|||
v = -v;
|
||||
|
||||
static if (isNarrowString!Source)
|
||||
s = cast(Source) source;
|
||||
s = s[$-source.length..$];
|
||||
|
||||
static if (doCount)
|
||||
{
|
||||
|
|
|
@ -1168,7 +1168,7 @@ do
|
|||
|
||||
/// ditto
|
||||
dchar decode(UseReplacementDchar useReplacementDchar = No.useReplacementDchar, S)(
|
||||
auto ref S str, ref size_t index) @trusted pure
|
||||
auto ref scope S str, ref size_t index) @trusted pure
|
||||
if (isSomeString!S)
|
||||
in
|
||||
{
|
||||
|
@ -1274,7 +1274,7 @@ do
|
|||
|
||||
/// ditto
|
||||
dchar decodeFront(UseReplacementDchar useReplacementDchar = No.useReplacementDchar, S)(
|
||||
ref S str, out size_t numCodeUnits) @trusted pure
|
||||
ref scope S str, out size_t numCodeUnits) @trusted pure
|
||||
if (isSomeString!S)
|
||||
in
|
||||
{
|
||||
|
|
|
@ -433,7 +433,7 @@ enum DecodeMode
|
|||
* writefln(decode("a > b")); // writes "a > b"
|
||||
* --------------
|
||||
*/
|
||||
string decode(return scope string s, DecodeMode mode=DecodeMode.LOOSE) @safe pure
|
||||
string decode(string s, DecodeMode mode=DecodeMode.LOOSE) @safe pure
|
||||
{
|
||||
import std.algorithm.searching : startsWith;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue