Add missing braces around statements in header files

This commit is contained in:
Daniel Pfeifer 2016-06-11 09:49:00 +02:00
parent a16bf141bc
commit 757b0ff5dd
3 changed files with 14 additions and 7 deletions

View File

@ -51,8 +51,9 @@ public:
virtual cmGlobalGenerator* CreateGlobalGenerator(const std::string& name,
cmake* cm) const
{
if (name != T::GetActualName())
if (name != T::GetActualName()) {
return 0;
}
return new T(cm);
}

View File

@ -643,9 +643,10 @@ public:
void AddInstallGenerator(cmInstallGenerator* g)
{
if (g)
if (g) {
this->InstallGenerators.push_back(g);
}
}
std::vector<cmInstallGenerator*>& GetInstallGenerators()
{
return this->InstallGenerators;
@ -653,9 +654,10 @@ public:
void AddTestGenerator(cmTestGenerator* g)
{
if (g)
if (g) {
this->TestGenerators.push_back(g);
}
}
const std::vector<cmTestGenerator*>& GetTestGenerators() const
{
return this->TestGenerators;

View File

@ -75,18 +75,22 @@ struct cmDocumentationEntry
cmDocumentationEntry() {}
cmDocumentationEntry(const char* doc[2])
{
if (doc[0])
if (doc[0]) {
this->Name = doc[0];
if (doc[1])
}
if (doc[1]) {
this->Brief = doc[1];
}
}
cmDocumentationEntry(const char* n, const char* b)
{
if (n)
if (n) {
this->Name = n;
if (b)
}
if (b) {
this->Brief = b;
}
}
};
/** Data structure to represent a single command line. */