Fix KWStyle warnings

This commit is contained in:
Eric NOULARD 2011-04-01 19:27:34 +02:00
parent 2973c1fbeb
commit dd04608132
2 changed files with 19 additions and 9 deletions

View File

@ -128,7 +128,9 @@ int cmCPackDragNDropGenerator::PackageFiles()
package_files.push_back(name);
}
std::sort(package_files.begin(), package_files.end());
package_files.erase(std::unique(package_files.begin(), package_files.end()), package_files.end());
package_files.erase(std::unique(package_files.begin(),
package_files.end()),
package_files.end());
// loop to create dmg files
@ -208,10 +210,11 @@ bool cmCPackDragNDropGenerator::RunCommand(cmOStringStream& command,
}
//----------------------------------------------------------------------
int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir, const std::string& output_file)
int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
const std::string& output_file)
{
// Get optional arguments ...
const std::string cpack_package_icon = this->GetOption("CPACK_PACKAGE_ICON")
const std::string cpack_package_icon = this->GetOption("CPACK_PACKAGE_ICON")
? this->GetOption("CPACK_PACKAGE_ICON") : "";
const std::string cpack_dmg_volume_name =
@ -540,15 +543,19 @@ bool cmCPackDragNDropGenerator::SupportsComponentInstallation() const
return true;
}
std::string cmCPackDragNDropGenerator::GetComponentInstallDirNameSuffix(const std::string& componentName)
std::string
cmCPackDragNDropGenerator::GetComponentInstallDirNameSuffix(
const std::string& componentName)
{
// we want to group components together that go in the same dmg package
std::string package_file_name = this->GetOption("CPACK_PACKAGE_FILE_NAME");
// we have 3 mutually exclusive modes to work in
// 1. all components in one package
// 2. each group goes in its own package with left over components in their own package
// 3. ignore groups - if grouping is defined, it is ignored and each component goes in its own package
// 2. each group goes in its own package with left over
// components in their own package
// 3. ignore groups - if grouping is defined, it is ignored
// and each component goes in its own package
if(this->componentPackageMethod == ONE_PACKAGE)
{
@ -559,13 +566,15 @@ std::string cmCPackDragNDropGenerator::GetComponentInstallDirNameSuffix(const st
{
// We have to find the name of the COMPONENT GROUP
// the current COMPONENT belongs to.
std::string groupVar = "CPACK_COMPONENT_" + cmSystemTools::UpperCase(componentName) + "_GROUP";
std::string groupVar = "CPACK_COMPONENT_" +
cmSystemTools::UpperCase(componentName) + "_GROUP";
const char* _groupName = GetOption(groupVar.c_str());
if (_groupName)
{
std::string groupName = _groupName;
groupName = GetComponentPackageFileName(package_file_name, groupName, true);
groupName = GetComponentPackageFileName(package_file_name,
groupName, true);
return groupName;
}
}

View File

@ -36,7 +36,8 @@ protected:
bool CopyFile(cmOStringStream& source, cmOStringStream& target);
bool RunCommand(cmOStringStream& command, std::string* output = 0);
std::string GetComponentInstallDirNameSuffix(const std::string& componentName);
std::string
GetComponentInstallDirNameSuffix(const std::string& componentName);
int CreateDMG(const std::string& src_dir, const std::string& output_file);