summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestTestHandler.cxx
diff options
context:
space:
mode:
authorDaniel Pfeifer <daniel@pfeifer-mail.de>2016-08-18 18:04:21 (GMT)
committerDaniel Pfeifer <daniel@pfeifer-mail.de>2016-08-18 18:04:21 (GMT)
commit50ad1e0a144ae1f2267a4966789e5a16372f458e (patch)
treeab43b965115505a6d7367566d280b2d9b179ff11 /Source/CTest/cmCTestTestHandler.cxx
parent7f97a6c94b59be7e7eba7362ce3eecdcff79ab70 (diff)
downloadCMake-50ad1e0a144ae1f2267a4966789e5a16372f458e.zip
CMake-50ad1e0a144ae1f2267a4966789e5a16372f458e.tar.gz
CMake-50ad1e0a144ae1f2267a4966789e5a16372f458e.tar.bz2
CTest: don't use else after return
Diffstat (limited to 'Source/CTest/cmCTestTestHandler.cxx')
-rw-r--r--Source/CTest/cmCTestTestHandler.cxx22
1 files changed, 10 insertions, 12 deletions
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index b932277..3ce0317 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -284,14 +284,13 @@ inline int GetNextNumber(std::string const& in, int& val,
}
pos = pos2 + 1;
return 1;
+ }
+ if (in.size() - pos == 0) {
+ val = -1;
} else {
- if (in.size() - pos == 0) {
- val = -1;
- } else {
- val = atoi(in.substr(pos, in.size() - pos).c_str());
- }
- return 0;
+ val = atoi(in.substr(pos, in.size() - pos).c_str());
}
+ return 0;
}
// get the next number in a string with numbers separated by ,
@@ -311,14 +310,13 @@ inline int GetNextRealNumber(std::string const& in, double& val,
}
pos = pos2 + 1;
return 1;
+ }
+ if (in.size() - pos == 0) {
+ val = -1;
} else {
- if (in.size() - pos == 0) {
- val = -1;
- } else {
- val = atof(in.substr(pos, in.size() - pos).c_str());
- }
- return 0;
+ val = atof(in.substr(pos, in.size() - pos).c_str());
}
+ return 0;
}
cmCTestTestHandler::cmCTestTestHandler()