diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2019-06-19 16:05:40 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-06-19 16:05:40 -0400 |
| commit | 442f8c6d3d42b892e3f13128bcb6487ff7508f0d (patch) | |
| tree | 79746a98390c49bba9639ee84999304731210a8b /tools/slang-generate/main.cpp | |
| parent | 48ae5496516878768d7de241b9b7fbba91fbaa74 (diff) | |
Make extractLine return a bool. (#991)
Diffstat (limited to 'tools/slang-generate/main.cpp')
| -rw-r--r-- | tools/slang-generate/main.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/tools/slang-generate/main.cpp b/tools/slang-generate/main.cpp index 7c0e3672a..be06836e7 100644 --- a/tools/slang-generate/main.cpp +++ b/tools/slang-generate/main.cpp @@ -554,15 +554,9 @@ void emitSimpleText( FILE* stream, StringSpan const& span) { - UnownedStringSlice content = span; - while (true) + UnownedStringSlice content(span), line; + while (StringUtil::extractLine(content, line)) { - const auto line = StringUtil::extractLine(content); - if (line.begin() == nullptr) - { - break; - } - // Write the line fwrite(line.begin(), 1, line.size(), stream); |
