Skip to content

Commit c9ef857

Browse files
committed
text: Convert to T.default.
1 parent 11293b1 commit c9ef857

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/watt/text/sink.volt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ public:
183183
if (mLength > 0) {
184184
return mArr[--mLength];
185185
}
186-
return T.init;
186+
return T.default;
187187
}
188188

189189
fn getLast() T

src/watt/text/source.volt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public:
5050
}
5151

5252
/*!
53-
* Have we reached EOF, if we have current = dchar.init.
53+
* Have we reached EOF, if we have current = dchar.default.
5454
*/
5555
final @property fn empty() dchar
5656
{
@@ -154,7 +154,7 @@ public:
154154
*
155155
* @SideEffects None.
156156
*
157-
* @Returns Unicode char at @p n or @p dchar.init at EOF.
157+
* @Returns Unicode char at @p n or @p dchar.default at EOF.
158158
*/
159159
final fn lookahead(n: size_t, out lookaheadEOF: bool) dchar
160160
{
@@ -213,7 +213,7 @@ public:
213213
//! @see empty.
214214
alias eof = empty;
215215

216-
//! Have we reached EOF, if we have front = dchar.init.
216+
//! Have we reached EOF, if we have front = dchar.default.
217217
empty: bool;
218218

219219

@@ -270,7 +270,7 @@ public:
270270
{
271271
mLastIndex = mNextIndex;
272272
mChar = decodeChar(ref mNextIndex);
273-
if (mChar == dchar.init) {
273+
if (mChar == dchar.default) {
274274
empty = true;
275275
mNextIndex = source.length;
276276
mLastIndex = source.length;
@@ -301,7 +301,7 @@ public:
301301
*
302302
* If `n` is `0`, this is the same as calling `front`.
303303
*
304-
* @Returns Unicode char at @p n or @p dchar.init at empty.
304+
* @Returns Unicode char at @p n or @p dchar.default at empty.
305305
*
306306
* @Throws UtfException if the source is not valid utf8.
307307
*
@@ -318,9 +318,9 @@ public:
318318
index := mNextIndex;
319319
for (i: size_t; i < n; i++) {
320320
c = decodeChar(ref index);
321-
if (c == dchar.init) {
321+
if (c == dchar.default) {
322322
lookaheadEmpty = true;
323-
return dchar.init;
323+
return dchar.default;
324324
}
325325
}
326326
return c;
@@ -381,12 +381,12 @@ public:
381381
*
382382
* @SideEffects None.
383383
*
384-
* @Returns Unicode char at @p index or @p dchar.init if out of bound.
384+
* @Returns Unicode char at @p index or @p dchar.default if out of bound.
385385
*/
386386
fn decodeChar(ref index: size_t) dchar
387387
{
388388
if (index >= source.length) {
389-
return dchar.init;
389+
return dchar.default;
390390
}
391391

392392
return decode(source, ref index);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy