Correct all eggs (#15906)
* "eg" is a misspelled "egg", "e.g." is "exempli gratia" * Also, "ie" is "i.e.".
This commit is contained in:
parent
bc3c0487d3
commit
bbe49a14ae
26 changed files with 38 additions and 38 deletions
|
|
@ -12,7 +12,7 @@ proc dataPointer*[T](a: T): pointer =
|
|||
## same as C++ `data` that works with std::string, std::vector etc.
|
||||
## Note: safe to use when a.len == 0 but whether the result is nil or not
|
||||
## is implementation defined for performance reasons.
|
||||
# this could be improved with ocmpiler support to avoid the `if`, eg in C++
|
||||
# this could be improved with ocmpiler support to avoid the `if`, e.g. in C++
|
||||
# `&a[0]` is well defined even if a.size() == 0
|
||||
when T is string | seq:
|
||||
if a.len == 0: nil else: cast[pointer](a[0].unsafeAddr)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue