mirror of
https://github.com/reactos/CMake.git
synced 2024-11-24 20:19:53 +00:00
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.
This commit is contained in:
parent
ad0f73573f
commit
a74bd470a4
@ -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));
|
||||
|
||||
|
@ -82,8 +82,8 @@ private:
|
||||
cmWIXSourceWriter& directoryDefinitions,
|
||||
cmWIXSourceWriter& fileDefinitions,
|
||||
cmWIXSourceWriter& featureDefinitions,
|
||||
std::size_t& directoryCounter,
|
||||
std::size_t& fileCounter);
|
||||
size_t& directoryCounter,
|
||||
size_t& fileCounter);
|
||||
|
||||
bool RequireOption(const std::string& name, std::string& value) const;
|
||||
|
||||
|
@ -37,7 +37,7 @@ void cmWIXRichTextFormatWriter::AddText(const std::string& text)
|
||||
{
|
||||
typedef unsigned char rtf_byte_t;
|
||||
|
||||
for(std::size_t i = 0; i < text.size(); ++i)
|
||||
for(size_t i = 0; i < text.size(); ++i)
|
||||
{
|
||||
rtf_byte_t c = rtf_byte_t(text[i]);
|
||||
|
||||
|
@ -150,9 +150,9 @@ void cmWIXSourceWriter::WriteXMLDeclaration()
|
||||
file << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << std::endl;
|
||||
}
|
||||
|
||||
void cmWIXSourceWriter::Indent(std::size_t count)
|
||||
void cmWIXSourceWriter::Indent(size_t count)
|
||||
{
|
||||
for(std::size_t i = 0; i < count; ++i)
|
||||
for(size_t i = 0; i < count; ++i)
|
||||
{
|
||||
file << " ";
|
||||
}
|
||||
@ -165,7 +165,7 @@ std::string cmWIXSourceWriter::EscapeAttributeValue(
|
||||
result.reserve(value.size());
|
||||
|
||||
char c = 0;
|
||||
for(std::size_t i = 0 ; i < value.size(); ++i)
|
||||
for(size_t i = 0 ; i < value.size(); ++i)
|
||||
{
|
||||
c = value[i];
|
||||
switch(c)
|
||||
|
@ -51,17 +51,17 @@ private:
|
||||
|
||||
void WriteXMLDeclaration();
|
||||
|
||||
void Indent(std::size_t count);
|
||||
void Indent(size_t count);
|
||||
|
||||
static std::string EscapeAttributeValue(const std::string& value);
|
||||
|
||||
std::ofstream file;
|
||||
cmCPackLog* Logger;
|
||||
|
||||
std::vector<std::string> elements;
|
||||
std::ofstream file;
|
||||
|
||||
State state;
|
||||
|
||||
cmCPackLog* Logger;
|
||||
std::vector<std::string> elements;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user