Doubled ticks
This commit is contained in:
parent
30737ea34b
commit
5a2e575bb6
1 changed files with 5 additions and 5 deletions
|
|
@ -3286,19 +3286,19 @@ when declared(initDebugger):
|
||||||
when hasAlloc:
|
when hasAlloc:
|
||||||
# XXX: make these the default (or implement the NilObject optimization)
|
# XXX: make these the default (or implement the NilObject optimization)
|
||||||
proc safeAdd*[T](x: var seq[T], y: T) {.noSideEffect.} =
|
proc safeAdd*[T](x: var seq[T], y: T) {.noSideEffect.} =
|
||||||
## Add `y` to `x` unless `x` is not yet initialized; in that case, `x`
|
## Add ``y`` to ``x`` unless ``x`` is not yet initialized; in that case,
|
||||||
## becomes `@[y]`
|
## ``x`` becomes ``@[y]``
|
||||||
if x == nil: x = @[y]
|
if x == nil: x = @[y]
|
||||||
else: x.add(y)
|
else: x.add(y)
|
||||||
|
|
||||||
proc safeAdd*(x: var string, y: char) =
|
proc safeAdd*(x: var string, y: char) =
|
||||||
## Add `y` to `x`. If `x` is `nil` it is initialized to `""`
|
## Add ``y`` to ``x``. If ``x`` is ``nil`` it is initialized to ``""``
|
||||||
if x == nil: x = ""
|
if x == nil: x = ""
|
||||||
x.add(y)
|
x.add(y)
|
||||||
|
|
||||||
proc safeAdd*(x: var string, y: string) =
|
proc safeAdd*(x: var string, y: string) =
|
||||||
## Add `y` to `x` unless `x` is not yet initalized; in that case, `x`
|
## Add ``y`` to ``x`` unless ``x`` is not yet initalized; in that case, ``x``
|
||||||
## becomes `y`
|
## becomes ``y``
|
||||||
if x == nil: x = y
|
if x == nil: x = y
|
||||||
else: x.add(y)
|
else: x.add(y)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue