const(dstring) was redundant.
This commit is contained in:
parent
0a625ec7a7
commit
98c66857bb
|
@ -71,6 +71,7 @@ final class Reader
|
||||||
uint bufferOffset_ = 0;
|
uint bufferOffset_ = 0;
|
||||||
// Index of the current character in the buffer.
|
// Index of the current character in the buffer.
|
||||||
size_t charIndex_ = 0;
|
size_t charIndex_ = 0;
|
||||||
|
|
||||||
// Current line in file.
|
// Current line in file.
|
||||||
uint line_;
|
uint line_;
|
||||||
// Current column in file.
|
// Current column in file.
|
||||||
|
@ -154,7 +155,7 @@ final class Reader
|
||||||
/// buffer; in that case the returned slice will be shorter.
|
/// buffer; in that case the returned slice will be shorter.
|
||||||
///
|
///
|
||||||
/// Returns: Characters starting at current position or an empty slice if out of bounds.
|
/// Returns: Characters starting at current position or an empty slice if out of bounds.
|
||||||
const(dstring) prefix(size_t length) @safe pure nothrow const @nogc
|
dstring prefix(size_t length) @safe pure nothrow const @nogc
|
||||||
{
|
{
|
||||||
return slice(0, length);
|
return slice(0, length);
|
||||||
}
|
}
|
||||||
|
@ -170,7 +171,7 @@ final class Reader
|
||||||
/// slice will be shorter.
|
/// slice will be shorter.
|
||||||
///
|
///
|
||||||
/// Returns: Slice into the internal buffer or an empty slice if out of bounds.
|
/// Returns: Slice into the internal buffer or an empty slice if out of bounds.
|
||||||
const(dstring) slice(size_t start, size_t end) @trusted pure nothrow const @nogc
|
dstring slice(size_t start, size_t end) @trusted pure nothrow const @nogc
|
||||||
{
|
{
|
||||||
end += bufferOffset_;
|
end += bufferOffset_;
|
||||||
start += bufferOffset_;
|
start += bufferOffset_;
|
||||||
|
|
Loading…
Reference in a new issue