]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commit
examples : small code cleanups (#322)
authorAndy Maloney <redacted>
Fri, 23 Dec 2022 18:18:51 +0000 (13:18 -0500)
committerGitHub <redacted>
Fri, 23 Dec 2022 18:18:51 +0000 (20:18 +0200)
commitdc90efd504639e05b2d78714aeae0894e621df59
treebab59a5dfeb9e5dbf29974f7b3ef845892ecefc3
parent7282e2109e0748421ee73271496f5911ca2b89a7
examples : small code cleanups (#322)

- remove unnecessary initialization of string to ""
- use empty() instead of checking size()
- use emplace_back instead of push_back
- use nullptr instead of NULL
- remove unnecessary call to .data() on string
- use character overload of find_first_of() instead of passing a string
examples/command/command.cpp
examples/main/main.cpp
examples/stream/stream.cpp
examples/talk/gpt-2.cpp
examples/talk/talk.cpp