summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx15
1 files changed, 5 insertions, 10 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index be9b0df..b0a6e83 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -2004,8 +2004,7 @@ cmGlobalGenerator::GetDirectoryContent(std::string const& dir, bool needDisk)
//----------------------------------------------------------------------------
void
cmGlobalGenerator::AddRuleHash(const std::vector<std::string>& outputs,
- std::vector<std::string>::const_iterator first,
- std::vector<std::string>::const_iterator last)
+ std::string const& content)
{
#if defined(CMAKE_BUILD_WITH_CMAKE)
// Ignore if there are no outputs.
@@ -2017,16 +2016,12 @@ cmGlobalGenerator::AddRuleHash(const std::vector<std::string>& outputs,
// Compute a hash of the rule.
RuleHash hash;
{
- unsigned char const* data;
- int length;
+ unsigned char const* data =
+ reinterpret_cast<unsigned char const*>(content.c_str());
+ int length = static_cast<int>(content.length());
cmsysMD5* sum = cmsysMD5_New();
cmsysMD5_Initialize(sum);
- for(std::vector<std::string>::const_iterator i = first; i != last; ++i)
- {
- data = reinterpret_cast<unsigned char const*>(i->c_str());
- length = static_cast<int>(i->length());
- cmsysMD5_Append(sum, data, length);
- }
+ cmsysMD5_Append(sum, data, length);
cmsysMD5_FinalizeHex(sum, hash.Data);
cmsysMD5_Delete(sum);
}