Skip to content

Commit

Permalink
apply nimpretty to source
Browse files Browse the repository at this point in the history
  • Loading branch information
Clonkk committed Jun 28, 2021
1 parent ad86a36 commit c3ba630
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions cppstl/std_complex.nim
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ func conj*[T: SomeFloat](self: CppComplex[T]): CppComplex[T] {.importcpp: "std::
{.pop.}

import complex
proc toComplex*[T](c: CppComplex[T]) : Complex[T] =
proc toComplex*[T](c: CppComplex[T]): Complex[T] =
result.re = c.real()
result.im = c.imag()

proc toCppComplex*[T](c: Complex[T]) : CppComplex[T] =
proc toCppComplex*[T](c: Complex[T]): CppComplex[T] =
result = initCppComplex(c.re, c.im)

proc `$`*[T](c: CppComplex[T]): string =
Expand Down
4 changes: 2 additions & 2 deletions cppstl/std_string.nim
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ proc last*(v: CppString): cchar {.inline.} =
v.back()

# Nim Iterators
iterator items*(v: CppString): cchar=
iterator items*(v: CppString): cchar =
## Iterate over all the elements in CppString `v`.
for idx in 0.csize_t ..< v.len():
yield v[idx]
Expand All @@ -297,7 +297,7 @@ iterator pairs*(v: CppString): (csize_t, cchar) =
for idx in 0.csize_t ..< v.len():
yield (idx, v[idx])

iterator mitems*(v: var CppString): var cchar=
iterator mitems*(v: var CppString): var cchar =
## Iterate over all the elements in CppString `v`.
for idx in 0.csize_t ..< v.len():
yield v[idx]
Expand Down
2 changes: 1 addition & 1 deletion cppstl/std_vector.nim
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ proc last*[T](v: CppVector[T]): T {.inline.} =

# Nim Iterators

iterator items*[T](v: CppVector[T]): T=
iterator items*[T](v: CppVector[T]): T =
## Iterate over all the elements in CppVector `v`.
runnableExamples:
var
Expand Down

0 comments on commit c3ba630

Please sign in to comment.