summaryrefslogtreecommitdiffstats
path: root/Source/CPack/WiX/cmCPackWIXGenerator.cxx
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2012-12-04 19:37:41 (GMT)
committerDavid Cole <david.cole@kitware.com>2012-12-04 19:37:41 (GMT)
commita74bd470a4d01cfa06710d039bb435b02682ac3f (patch)
treefe47d14e7ad5fb6edfe993511ab6fa79d0276c56 /Source/CPack/WiX/cmCPackWIXGenerator.cxx
parentad0f73573fcc59c7c428ef5e529f8fec6a1cfbe6 (diff)
downloadCMake-a74bd470a4d01cfa06710d039bb435b02682ac3f.zip
CMake-a74bd470a4d01cfa06710d039bb435b02682ac3f.tar.gz
CMake-a74bd470a4d01cfa06710d039bb435b02682ac3f.tar.bz2
CPack: Fix dashboard errors and warnings (#11575)
...revealed by the Nightly dashboard runs last night. Use "size_t" instead of "std::size_t" so that it compiles with Visual Studio 6, too. Fix warnings about shadowed "tmp" local variable and ordering of member variables vs. lines of code in the constructor initializer list.
Diffstat (limited to 'Source/CPack/WiX/cmCPackWIXGenerator.cxx')
-rw-r--r--Source/CPack/WiX/cmCPackWIXGenerator.cxx22
1 files changed, 11 insertions, 11 deletions
diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.cxx b/Source/CPack/WiX/cmCPackWIXGenerator.cxx
index 68ca60e..8b58625 100644
--- a/Source/CPack/WiX/cmCPackWIXGenerator.cxx
+++ b/Source/CPack/WiX/cmCPackWIXGenerator.cxx
@@ -185,7 +185,7 @@ bool cmCPackWIXGenerator::PackageFilesImpl()
}
std::stringstream objectFiles;
- for(std::size_t i = 0; i < wixSources.size(); ++i)
+ for(size_t i = 0; i < wixSources.size(); ++i)
{
const std::string& sourceFilename = wixSources[i];
@@ -290,7 +290,7 @@ bool cmCPackWIXGenerator::CreateWiXSourceFiles()
install_root.pop_back();
}
- for(std::size_t i = 1; i < install_root.size(); ++i)
+ for(size_t i = 1; i < install_root.size(); ++i)
{
directoryDefinitions.BeginElement("Directory");
@@ -300,16 +300,16 @@ bool cmCPackWIXGenerator::CreateWiXSourceFiles()
}
else
{
- std::stringstream tmp;
- tmp << "INSTALL_PREFIX_" << i;
- directoryDefinitions.AddAttribute("Id", tmp.str());
+ std::stringstream ss;
+ ss << "INSTALL_PREFIX_" << i;
+ directoryDefinitions.AddAttribute("Id", ss.str());
}
directoryDefinitions.AddAttribute("Name", install_root[i]);
}
- std::size_t directoryCounter = 0;
- std::size_t fileCounter = 0;
+ size_t directoryCounter = 0;
+ size_t fileCounter = 0;
std::string fileDefinitionsFilename =
cpackTopLevel + "/files.wxs";
@@ -345,7 +345,7 @@ bool cmCPackWIXGenerator::CreateWiXSourceFiles()
featureDefinitions.EndElement();
fileDefinitions.EndElement();
- for(std::size_t i = 1; i < install_root.size(); ++i)
+ for(size_t i = 1; i < install_root.size(); ++i)
{
directoryDefinitions.EndElement();
}
@@ -431,13 +431,13 @@ void cmCPackWIXGenerator::AddDirectoryAndFileDefinitons(
cmWIXSourceWriter& directoryDefinitions,
cmWIXSourceWriter& fileDefinitions,
cmWIXSourceWriter& featureDefinitions,
- std::size_t& directoryCounter,
- std::size_t& fileCounter)
+ size_t& directoryCounter,
+ size_t& fileCounter)
{
cmsys::Directory dir;
dir.Load(topdir.c_str());
- for(std::size_t i = 0; i < dir.GetNumberOfFiles(); ++i)
+ for(size_t i = 0; i < dir.GetNumberOfFiles(); ++i)
{
std::string fileName = dir.GetFile(static_cast<unsigned long>(i));