summaryrefslogtreecommitdiffstats
path: root/Source/CPack/IFW/cmCPackIFWRepository.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/CPack/IFW/cmCPackIFWRepository.cxx')
-rw-r--r--Source/CPack/IFW/cmCPackIFWRepository.cxx14
1 files changed, 5 insertions, 9 deletions
diff --git a/Source/CPack/IFW/cmCPackIFWRepository.cxx b/Source/CPack/IFW/cmCPackIFWRepository.cxx
index b149f81..1838005 100644
--- a/Source/CPack/IFW/cmCPackIFWRepository.cxx
+++ b/Source/CPack/IFW/cmCPackIFWRepository.cxx
@@ -45,16 +45,16 @@ bool cmCPackIFWRepository::IsValid() const
switch (Update) {
case None:
- valid = Url.empty() ? false : true;
+ valid = !Url.empty();
break;
case Add:
- valid = Url.empty() ? false : true;
+ valid = !Url.empty();
break;
case Remove:
- valid = Url.empty() ? false : true;
+ valid = !Url.empty();
break;
case Replace:
- valid = (OldUrl.empty() || NewUrl.empty()) ? false : true;
+ valid = !OldUrl.empty() && !NewUrl.empty();
break;
}
@@ -244,11 +244,7 @@ bool cmCPackIFWRepository::PatchUpdatesXml()
fout.Close();
- if (!cmSystemTools::RenameFile(updatesPatchXml.data(), updatesXml.data())) {
- return false;
- }
-
- return true;
+ return cmSystemTools::RenameFile(updatesPatchXml.data(), updatesXml.data());
}
void cmCPackIFWRepository::WriteRepositoryConfig(cmXMLWriter& xout)