summaryrefslogtreecommitdiffstats
path: root/Source/cmNewLineStyle.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-08-23 13:00:00 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2016-08-23 13:00:00 (GMT)
commit797f7ad87d6f1b6dd7cbbb553d5525ac8ee390f1 (patch)
treef5922b06caf987f6faff13f8c2ba8e0f164457f6 /Source/cmNewLineStyle.cxx
parent762131fe8d585ced6b259a451ccde8fded2a8ca4 (diff)
parent7b6349da4dc968691f1a374211fcc153c8b4f1c6 (diff)
downloadCMake-797f7ad87d6f1b6dd7cbbb553d5525ac8ee390f1.zip
CMake-797f7ad87d6f1b6dd7cbbb553d5525ac8ee390f1.tar.gz
CMake-797f7ad87d6f1b6dd7cbbb553d5525ac8ee390f1.tar.bz2
Merge topic 'else-after-return'
7b6349da CMake: don't use else after return 50ad1e0a CTest: don't use else after return 7f97a6c9 CPack: don't use else after return 4988b914 CursesDialog: don't use else after return
Diffstat (limited to 'Source/cmNewLineStyle.cxx')
-rw-r--r--Source/cmNewLineStyle.cxx15
1 files changed, 7 insertions, 8 deletions
diff --git a/Source/cmNewLineStyle.cxx b/Source/cmNewLineStyle.cxx
index c03f60d..d64993a 100644
--- a/Source/cmNewLineStyle.cxx
+++ b/Source/cmNewLineStyle.cxx
@@ -34,19 +34,18 @@ bool cmNewLineStyle::ReadFromArguments(const std::vector<std::string>& args,
if (eol == "LF" || eol == "UNIX") {
NewLineStyle = LF;
return true;
- } else if (eol == "CRLF" || eol == "WIN32" || eol == "DOS") {
+ }
+ if (eol == "CRLF" || eol == "WIN32" || eol == "DOS") {
NewLineStyle = CRLF;
return true;
- } else {
- errorString = "NEWLINE_STYLE sets an unknown style, only LF, "
- "CRLF, UNIX, DOS, and WIN32 are supported";
- return false;
}
- } else {
- errorString = "NEWLINE_STYLE must set a style: "
- "LF, CRLF, UNIX, DOS, or WIN32";
+ errorString = "NEWLINE_STYLE sets an unknown style, only LF, "
+ "CRLF, UNIX, DOS, and WIN32 are supported";
return false;
}
+ errorString = "NEWLINE_STYLE must set a style: "
+ "LF, CRLF, UNIX, DOS, or WIN32";
+ return false;
}
}
return true;