From 8160ecd3867359c1047f7a98dad5d863339322b1 Mon Sep 17 00:00:00 2001
From: "w.klijn" <w.klijn@fz-juelich.de>
Date: Fri, 1 Jul 2016 13:11:38 +0200
Subject: [PATCH] Use if with curly braces at all times

---
 src/swcio.cpp | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/swcio.cpp b/src/swcio.cpp
index 588d969d..98178ea8 100644
--- a/src/swcio.cpp
+++ b/src/swcio.cpp
@@ -143,13 +143,15 @@ std::istream& swc_parser::safe_getline(std::istream& is, std::string& t)
         case '\n':
             return is;
         case '\r':
-            if (sb->sgetc() == '\n')
+            if (sb->sgetc() == '\n') {
                 sb->sbumpc();
+            }
             return is;
         case EOF:
             // Also handle the case when the last line has no line ending
-            if (t.empty())
+            if (t.empty()) {
                 is.setstate(std::ios::eofbit);
+            }
             return is;
         default:
             t += (char)c;
@@ -165,7 +167,9 @@ std::istream &swc_parser::parse_record(std::istream &is, swc_record &record)
 
         ++lineno_;
         if (!linebuff_.empty() && !starts_with(linebuff_, comment_prefix_))
+        {
             break;
+        }
     }
 
     if (is.bad()) {
-- 
GitLab