Commit b1ec5dea authored by Daniel Pfeifer's avatar Daniel Pfeifer
Browse files

Pass large types by const&, small types by value

parent 3216c217
......@@ -205,8 +205,7 @@ bool cmCacheManager::ReadPropertyEntry(std::string const& entryKey,
return false;
}
void cmCacheManager::WritePropertyEntries(std::ostream& os,
CacheIterator const& i)
void cmCacheManager::WritePropertyEntries(std::ostream& os, CacheIterator i)
{
for (const char** p = this->PersistentProperties; *p; ++p) {
if (const char* value = i.GetProperty(*p)) {
......
......@@ -228,7 +228,7 @@ private:
static const char* PersistentProperties[];
bool ReadPropertyEntry(std::string const& key, CacheEntry& e);
void WritePropertyEntries(std::ostream& os, CacheIterator const& i);
void WritePropertyEntries(std::ostream& os, CacheIterator i);
CacheEntryMap Cache;
// Only cmake and cmState should be able to add cache values
......
......@@ -333,7 +333,7 @@ int cmComputeLinkDepends::AddLinkEntry(cmLinkItem const& item)
return index;
}
void cmComputeLinkDepends::FollowLinkEntry(BFSEntry const& qe)
void cmComputeLinkDepends::FollowLinkEntry(BFSEntry qe)
{
// Get this entry representation.
int depender_index = qe.Index;
......
......@@ -93,7 +93,7 @@ private:
const char* LibDepends;
};
std::queue<BFSEntry> BFSQueue;
void FollowLinkEntry(BFSEntry const&);
void FollowLinkEntry(BFSEntry qe);
// Shared libraries that are included only because they are
// dependencies of other shared libraries, not because they are part
......
......@@ -10,8 +10,7 @@ class cmDynamicLoaderCache
{
public:
~cmDynamicLoaderCache();
void CacheFile(const char* path,
const cmsys::DynamicLoader::LibraryHandle& /*p*/);
void CacheFile(const char* path, cmsys::DynamicLoader::LibraryHandle /*p*/);
bool GetCacheFile(const char* path,
cmsys::DynamicLoader::LibraryHandle& /*p*/);
bool FlushCache(const char* path);
......@@ -29,8 +28,8 @@ cmDynamicLoaderCache::~cmDynamicLoaderCache()
{
}
void cmDynamicLoaderCache::CacheFile(
const char* path, const cmsys::DynamicLoader::LibraryHandle& p)
void cmDynamicLoaderCache::CacheFile(const char* path,
cmsys::DynamicLoader::LibraryHandle p)
{
cmsys::DynamicLoader::LibraryHandle h;
if (this->GetCacheFile(path, h)) {
......
......@@ -53,17 +53,17 @@ template <size_t s>
struct cmELFByteSwapSize
{
};
void cmELFByteSwap(char* /*unused*/, cmELFByteSwapSize<1> const& /*unused*/)
void cmELFByteSwap(char* /*unused*/, cmELFByteSwapSize<1> /*unused*/)
{
}
void cmELFByteSwap(char* data, cmELFByteSwapSize<2> const& /*unused*/)
void cmELFByteSwap(char* data, cmELFByteSwapSize<2> /*unused*/)
{
char one_byte;
one_byte = data[0];
data[0] = data[1];
data[1] = one_byte;
}
void cmELFByteSwap(char* data, cmELFByteSwapSize<4> const& /*unused*/)
void cmELFByteSwap(char* data, cmELFByteSwapSize<4> /*unused*/)
{
char one_byte;
one_byte = data[0];
......@@ -73,7 +73,7 @@ void cmELFByteSwap(char* data, cmELFByteSwapSize<4> const& /*unused*/)
data[1] = data[2];
data[2] = one_byte;
}
void cmELFByteSwap(char* data, cmELFByteSwapSize<8> const& /*unused*/)
void cmELFByteSwap(char* data, cmELFByteSwapSize<8> /*unused*/)
{
char one_byte;
one_byte = data[0];
......
......@@ -1121,9 +1121,9 @@ protected:
bool InstallSymlink(const char* fromFile, const char* toFile);
bool InstallFile(const char* fromFile, const char* toFile,
MatchProperties const& match_properties);
MatchProperties match_properties);
bool InstallDirectory(const char* source, const char* destination,
MatchProperties const& match_properties);
MatchProperties match_properties);
virtual bool Install(const char* fromFile, const char* toFile);
virtual std::string const& ToName(std::string const& fromName)
{
......@@ -1542,7 +1542,7 @@ bool cmFileCopier::InstallSymlink(const char* fromFile, const char* toFile)
}
bool cmFileCopier::InstallFile(const char* fromFile, const char* toFile,
MatchProperties const& match_properties)
MatchProperties match_properties)
{
// Determine whether we will copy the file.
bool copy = true;
......@@ -1596,7 +1596,7 @@ bool cmFileCopier::InstallFile(const char* fromFile, const char* toFile,
bool cmFileCopier::InstallDirectory(const char* source,
const char* destination,
MatchProperties const& match_properties)
MatchProperties match_properties)
{
// Inform the user about this directory installation.
this->ReportCopy(destination, TypeDir,
......
......@@ -212,7 +212,8 @@ std::string cmFindProgramCommand::FindAppBundle()
return "";
}
std::string cmFindProgramCommand::GetBundleExecutable(std::string bundlePath)
std::string cmFindProgramCommand::GetBundleExecutable(
std::string const& bundlePath)
{
std::string executable;
(void)bundlePath;
......
......@@ -43,7 +43,7 @@ private:
std::string FindNormalProgramDirsPerName();
std::string FindNormalProgramNamesPerDir();
std::string FindAppBundle();
std::string GetBundleExecutable(std::string bundlePath);
std::string GetBundleExecutable(std::string const& bundlePath);
};
#endif
......@@ -76,7 +76,7 @@ public:
cmLinkImplItem cmGeneratorTarget::TargetPropertyEntry::NoLinkImplItem;
void CreatePropertyGeneratorExpressions(
cmStringRange const& entries, cmBacktraceRange const& backtraces,
cmStringRange entries, cmBacktraceRange backtraces,
std::vector<cmGeneratorTarget::TargetPropertyEntry*>& items,
bool evaluateForBuildsystem = false)
{
......
......@@ -1482,13 +1482,13 @@ cmGlobalGenerator::CreateQtAutoGeneratorsTargets()
}
cmLinkLineComputer* cmGlobalGenerator::CreateLinkLineComputer(
cmOutputConverter* outputConverter, cmStateDirectory stateDir) const
cmOutputConverter* outputConverter, cmStateDirectory const& stateDir) const
{
return new cmLinkLineComputer(outputConverter, stateDir);
}
cmLinkLineComputer* cmGlobalGenerator::CreateMSVC60LinkLineComputer(
cmOutputConverter* outputConverter, cmStateDirectory stateDir) const
cmOutputConverter* outputConverter, cmStateDirectory const& stateDir) const
{
return new cmMSVC60LinkLineComputer(outputConverter, stateDir);
}
......
......@@ -105,10 +105,12 @@ public:
virtual void Generate();
virtual cmLinkLineComputer* CreateLinkLineComputer(
cmOutputConverter* outputConverter, cmStateDirectory stateDir) const;
cmOutputConverter* outputConverter,
cmStateDirectory const& stateDir) const;
cmLinkLineComputer* CreateMSVC60LinkLineComputer(
cmOutputConverter* outputConverter, cmStateDirectory stateDir) const;
cmOutputConverter* outputConverter,
cmStateDirectory const& stateDir) const;
/**
* Set/Get and Clear the enabled languages.
......
......@@ -77,7 +77,8 @@ void cmGlobalNinjaGenerator::WriteComment(std::ostream& os,
}
cmLinkLineComputer* cmGlobalNinjaGenerator::CreateLinkLineComputer(
cmOutputConverter* outputConverter, cmStateDirectory /* stateDir */) const
cmOutputConverter* outputConverter,
cmStateDirectory const& /* stateDir */) const
{
return new cmNinjaLinkLineComputer(
outputConverter,
......
......@@ -78,7 +78,7 @@ public:
cmLinkLineComputer* CreateLinkLineComputer(
cmOutputConverter* outputConverter,
cmStateDirectory stateDir) const CM_OVERRIDE;
cmStateDirectory const& stateDir) const CM_OVERRIDE;
/**
* Write the given @a comment to the output stream @a os. It
......
......@@ -27,7 +27,7 @@ void cmInstallGenerator::AddInstallRule(
std::vector<std::string> const& files, bool optional /* = false */,
const char* permissions_file /* = 0 */,
const char* permissions_dir /* = 0 */, const char* rename /* = 0 */,
const char* literal_args /* = 0 */, Indent const& indent)
const char* literal_args /* = 0 */, Indent indent)
{
// Use the FILE command to install the file.
std::string stype;
......
......@@ -43,7 +43,7 @@ public:
std::vector<std::string> const& files, bool optional = false,
const char* permissions_file = CM_NULLPTR,
const char* permissions_dir = CM_NULLPTR, const char* rename = CM_NULLPTR,
const char* literal_args = CM_NULLPTR, Indent const& indent = Indent());
const char* literal_args = CM_NULLPTR, Indent indent = Indent());
/** Get the install destination as it should appear in the
installation script. */
......
......@@ -13,7 +13,7 @@
#include "cmStateTypes.h"
cmLinkLineComputer::cmLinkLineComputer(cmOutputConverter* outputConverter,
cmStateDirectory stateDir)
cmStateDirectory const& stateDir)
: StateDir(stateDir)
, OutputConverter(outputConverter)
, ForResponse(false)
......
......@@ -20,7 +20,7 @@ class cmLinkLineComputer
public:
cmLinkLineComputer(cmOutputConverter* outputConverter,
cmStateDirectory stateDir);
cmStateDirectory const& stateDir);
virtual ~cmLinkLineComputer();
void SetUseWatcomQuote(bool useWatcomQuote);
......
......@@ -10,13 +10,12 @@
#include "cmComputeLinkInformation.h"
#include "cmGeneratorTarget.h"
#include "cmGlobalNinjaGenerator.h"
#include "cmStateDirectory.h"
#include "cmStateTypes.h"
class cmOutputConverter;
cmLinkLineDeviceComputer::cmLinkLineDeviceComputer(
cmOutputConverter* outputConverter, cmStateDirectory stateDir)
cmOutputConverter* outputConverter, cmStateDirectory const& stateDir)
: cmLinkLineComputer(outputConverter, stateDir)
{
}
......@@ -89,7 +88,7 @@ std::string cmLinkLineDeviceComputer::GetLinkerLanguage(cmGeneratorTarget*,
}
cmNinjaLinkLineDeviceComputer::cmNinjaLinkLineDeviceComputer(
cmOutputConverter* outputConverter, cmStateDirectory stateDir,
cmOutputConverter* outputConverter, cmStateDirectory const& stateDir,
cmGlobalNinjaGenerator const* gg)
: cmLinkLineDeviceComputer(outputConverter, stateDir)
, GG(gg)
......
......@@ -22,7 +22,7 @@ class cmLinkLineDeviceComputer : public cmLinkLineComputer
public:
cmLinkLineDeviceComputer(cmOutputConverter* outputConverter,
cmStateDirectory stateDir);
cmStateDirectory const& stateDir);
~cmLinkLineDeviceComputer() CM_OVERRIDE;
std::string ComputeLinkLibraries(cmComputeLinkInformation& cli,
......@@ -39,7 +39,7 @@ class cmNinjaLinkLineDeviceComputer : public cmLinkLineDeviceComputer
public:
cmNinjaLinkLineDeviceComputer(cmOutputConverter* outputConverter,
cmStateDirectory stateDir,
cmStateDirectory const& stateDir,
cmGlobalNinjaGenerator const* gg);
std::string ConvertToLinkReference(std::string const& input) const
......
......@@ -307,7 +307,8 @@ struct cmListFileBacktrace::Entry : public cmListFileContext
unsigned int RefCount;
};
cmListFileBacktrace::cmListFileBacktrace(cmStateSnapshot bottom, Entry* up,
cmListFileBacktrace::cmListFileBacktrace(cmStateSnapshot const& bottom,
Entry* up,
cmListFileContext const& lfc)
: Bottom(bottom)
, Cur(new Entry(lfc, up))
......@@ -316,7 +317,8 @@ cmListFileBacktrace::cmListFileBacktrace(cmStateSnapshot bottom, Entry* up,
this->Cur->Ref();
}
cmListFileBacktrace::cmListFileBacktrace(cmStateSnapshot bottom, Entry* cur)
cmListFileBacktrace::cmListFileBacktrace(cmStateSnapshot const& bottom,
Entry* cur)
: Bottom(bottom)
, Cur(cur)
{
......@@ -332,7 +334,7 @@ cmListFileBacktrace::cmListFileBacktrace()
{
}
cmListFileBacktrace::cmListFileBacktrace(cmStateSnapshot snapshot)
cmListFileBacktrace::cmListFileBacktrace(cmStateSnapshot const& snapshot)
: Bottom(snapshot.GetCallStackBottom())
, Cur(CM_NULLPTR)
{
......
......@@ -107,7 +107,7 @@ public:
// Construct an empty backtrace whose bottom sits in the directory
// indicated by the given valid snapshot.
cmListFileBacktrace(cmStateSnapshot snapshot);
cmListFileBacktrace(cmStateSnapshot const& snapshot);
// Backtraces may be copied and assigned as values.
cmListFileBacktrace(cmListFileBacktrace const& r);
......@@ -143,9 +143,9 @@ private:
cmStateSnapshot Bottom;
Entry* Cur;
cmListFileBacktrace(cmStateSnapshot bottom, Entry* up,
cmListFileBacktrace(cmStateSnapshot const& bottom, Entry* up,
cmListFileContext const& lfc);
cmListFileBacktrace(cmStateSnapshot bottom, Entry* cur);
cmListFileBacktrace(cmStateSnapshot const& bottom, Entry* cur);
};
struct cmListFile
......
......@@ -3,8 +3,6 @@
#include "cmMSVC60LinkLineComputer.h"
#include "cmStateDirectory.h"
#if defined(_WIN32) && !defined(__CYGWIN__)
#include "cmSystemTools.h"
#endif
......@@ -12,7 +10,7 @@
class cmOutputConverter;
cmMSVC60LinkLineComputer::cmMSVC60LinkLineComputer(
cmOutputConverter* outputConverter, cmStateDirectory stateDir)
cmOutputConverter* outputConverter, cmStateDirectory const& stateDir)
: cmLinkLineComputer(outputConverter, stateDir)
{
}
......
......@@ -19,7 +19,7 @@ class cmMSVC60LinkLineComputer : public cmLinkLineComputer
public:
cmMSVC60LinkLineComputer(cmOutputConverter* outputConverter,
cmStateDirectory stateDir);
cmStateDirectory const& stateDir);
std::string ConvertToLinkReference(std::string const& input) const
CM_OVERRIDE;
......
......@@ -3463,7 +3463,7 @@ void cmMakefile::ConfigureString(const std::string& input, std::string& output,
int cmMakefile::ConfigureFile(const char* infile, const char* outfile,
bool copyonly, bool atOnly, bool escapeQuotes,
const cmNewLineStyle& newLine)
cmNewLineStyle newLine)
{
int res = 1;
if (!this->CanIWriteThisFile(outfile)) {
......
......@@ -548,7 +548,7 @@ public:
*/
int ConfigureFile(const char* infile, const char* outfile, bool copyonly,
bool atOnly, bool escapeQuotes,
const cmNewLineStyle& = cmNewLineStyle());
cmNewLineStyle = cmNewLineStyle());
#if defined(CMAKE_BUILD_WITH_CMAKE)
/**
......
......@@ -1255,7 +1255,7 @@ class cmMakefileTargetGeneratorObjectStrings
public:
cmMakefileTargetGeneratorObjectStrings(std::vector<std::string>& strings,
cmOutputConverter* outputConverter,
cmStateDirectory stateDir,
cmStateDirectory const& stateDir,
std::string::size_type limit)
: Strings(strings)
, OutputConverter(outputConverter)
......@@ -1574,7 +1574,7 @@ std::string cmMakefileTargetGenerator::CreateResponseFile(
}
cmLinkLineComputer* cmMakefileTargetGenerator::CreateLinkLineComputer(
cmOutputConverter* outputConverter, cmStateDirectory stateDir)
cmOutputConverter* outputConverter, cmStateDirectory const& stateDir)
{
if (this->Makefile->IsOn("MSVC60")) {
return this->GlobalGenerator->CreateMSVC60LinkLineComputer(outputConverter,
......
......@@ -143,7 +143,7 @@ protected:
std::vector<std::string>& makefile_depends);
cmLinkLineComputer* CreateLinkLineComputer(
cmOutputConverter* outputConverter, cmStateDirectory stateDir);
cmOutputConverter* outputConverter, cmStateDirectory const& stateDir);
/** Create a response file with the given set of options. Returns
the relative path from the target build working directory to the
......
......@@ -4,12 +4,11 @@
#include "cmNinjaLinkLineComputer.h"
#include "cmGlobalNinjaGenerator.h"
#include "cmStateDirectory.h"
class cmOutputConverter;
cmNinjaLinkLineComputer::cmNinjaLinkLineComputer(
cmOutputConverter* outputConverter, cmStateDirectory stateDir,
cmOutputConverter* outputConverter, cmStateDirectory const& stateDir,
cmGlobalNinjaGenerator const* gg)
: cmLinkLineComputer(outputConverter, stateDir)
, GG(gg)
......
......@@ -20,7 +20,7 @@ class cmNinjaLinkLineComputer : public cmLinkLineComputer
public:
cmNinjaLinkLineComputer(cmOutputConverter* outputConverter,
cmStateDirectory stateDir,
cmStateDirectory const& stateDir,
cmGlobalNinjaGenerator const* gg);
std::string ConvertToLinkReference(std::string const& input) const
......
......@@ -424,7 +424,7 @@ struct cmOrderDirectoriesCompare
// The conflict pair is unique based on just the directory
// (first). The second element is only used for displaying
// information about why the entry is present.
bool operator()(ConflictPair const& l, ConflictPair const& r)
bool operator()(ConflictPair l, ConflictPair r)
{
return l.first == r.first;
}
......
......@@ -14,7 +14,7 @@
#include "cmStateDirectory.h"
#include "cmSystemTools.h"
cmOutputConverter::cmOutputConverter(cmStateSnapshot snapshot)
cmOutputConverter::cmOutputConverter(cmStateSnapshot const& snapshot)
: StateSnapshot(snapshot)
, LinkScriptShell(false)
{
......@@ -81,7 +81,7 @@ static bool cmOutputConverterNotAbove(const char* a, const char* b)
bool cmOutputConverter::ContainedInDirectory(std::string const& local_path,
std::string const& remote_path,
cmStateDirectory directory)
cmStateDirectory const& directory)
{
const std::string relativePathTopBinary =
directory.GetRelativePathTopBinary();
......
......@@ -15,7 +15,7 @@ class cmStateDirectory;
class cmOutputConverter
{
public:
cmOutputConverter(cmStateSnapshot snapshot);
cmOutputConverter(cmStateSnapshot const& snapshot);
enum OutputFormat
{
......@@ -94,7 +94,7 @@ public:
static bool ContainedInDirectory(std::string const& local_path,
std::string const& remote_path,
cmStateDirectory directory);
cmStateDirectory const& directory);
/**
* Convert the given remote path to a relative path with respect to
......
......@@ -633,7 +633,7 @@ cmStateSnapshot cmState::CreateBaseSnapshot()
}
cmStateSnapshot cmState::CreateBuildsystemDirectorySnapshot(
cmStateSnapshot originSnapshot)
cmStateSnapshot const& originSnapshot)
{
assert(originSnapshot.IsValid());
cmStateDetail::PositionType pos =
......@@ -667,7 +667,7 @@ cmStateSnapshot cmState::CreateBuildsystemDirectorySnapshot(
}
cmStateSnapshot cmState::CreateFunctionCallSnapshot(
cmStateSnapshot originSnapshot, std::string const& fileName)
cmStateSnapshot const& originSnapshot, std::string const& fileName)
{
cmStateDetail::PositionType pos =
this->SnapshotData.Push(originSnapshot.Position, *originSnapshot.Position);
......@@ -686,7 +686,7 @@ cmStateSnapshot cmState::CreateFunctionCallSnapshot(
}
cmStateSnapshot cmState::CreateMacroCallSnapshot(
cmStateSnapshot originSnapshot, std::string const& fileName)
cmStateSnapshot const& originSnapshot, std::string const& fileName)
{
cmStateDetail::PositionType pos =
this->SnapshotData.Push(originSnapshot.Position, *originSnapshot.Position);
......@@ -701,7 +701,7 @@ cmStateSnapshot cmState::CreateMacroCallSnapshot(
}
cmStateSnapshot cmState::CreateIncludeFileSnapshot(
cmStateSnapshot originSnapshot, const std::string& fileName)
cmStateSnapshot const& originSnapshot, std::string const& fileName)
{
cmStateDetail::PositionType pos =
this->SnapshotData.Push(originSnapshot.Position, *originSnapshot.Position);
......@@ -716,7 +716,7 @@ cmStateSnapshot cmState::CreateIncludeFileSnapshot(
}
cmStateSnapshot cmState::CreateVariableScopeSnapshot(
cmStateSnapshot originSnapshot)
cmStateSnapshot const& originSnapshot)
{
cmStateDetail::PositionType pos =
this->SnapshotData.Push(originSnapshot.Position, *originSnapshot.Position);
......@@ -734,7 +734,7 @@ cmStateSnapshot cmState::CreateVariableScopeSnapshot(
}
cmStateSnapshot cmState::CreateInlineListFileSnapshot(
cmStateSnapshot originSnapshot, const std::string& fileName)
cmStateSnapshot const& originSnapshot, std::string const& fileName)
{
cmStateDetail::PositionType pos =
this->SnapshotData.Push(originSnapshot.Position, *originSnapshot.Position);
......@@ -748,7 +748,7 @@ cmStateSnapshot cmState::CreateInlineListFileSnapshot(
}
cmStateSnapshot cmState::CreatePolicyScopeSnapshot(
cmStateSnapshot originSnapshot)
cmStateSnapshot const& originSnapshot)
{
cmStateDetail::PositionType pos =
this->SnapshotData.Push(originSnapshot.Position, *originSnapshot.Position);
......@@ -759,7 +759,7 @@ cmStateSnapshot cmState::CreatePolicyScopeSnapshot(
return cmStateSnapshot(this, pos);
}
cmStateSnapshot cmState::Pop(cmStateSnapshot originSnapshot)
cmStateSnapshot cmState::Pop(cmStateSnapshot const& originSnapshot)
{
cmStateDetail::PositionType pos = originSnapshot.Position;
cmStateDetail::PositionType prevPos = pos;
......
......@@ -36,18 +36,20 @@ public:
cmStateSnapshot CreateBaseSnapshot();
cmStateSnapshot CreateBuildsystemDirectorySnapshot(
cmStateSnapshot originSnapshot);
cmStateSnapshot CreateFunctionCallSnapshot(cmStateSnapshot originSnapshot,
std::string const& fileName);
cmStateSnapshot CreateMacroCallSnapshot(cmStateSnapshot originSnapshot,
std::string const& fileName);
cmStateSnapshot CreateIncludeFileSnapshot(cmStateSnapshot originSnapshot,
std::string const& fileName);
cmStateSnapshot CreateVariableScopeSnapshot(cmStateSnapshot originSnapshot);
cmStateSnapshot CreateInlineListFileSnapshot(cmStateSnapshot originSnapshot,
std::string const& fileName);
cmStateSnapshot CreatePolicyScopeSnapshot(cmStateSnapshot originSnapshot);
cmStateSnapshot Pop(cmStateSnapshot originSnapshot);
cmStateSnapshot const& originSnapshot);
cmStateSnapshot CreateFunctionCallSnapshot(
cmStateSnapshot const& originSnapshot, std::string const& fileName);
cmStateSnapshot CreateMacroCallSnapshot(
cmStateSnapshot const& originSnapshot, std::string const& fileName);
cmStateSnapshot CreateIncludeFileSnapshot(
cmStateSnapshot const& originSnapshot, std::string const& fileName);
cmStateSnapshot CreateVariableScopeSnapshot(
cmStateSnapshot const& originSnapshot);
cmStateSnapshot CreateInlineListFileSnapshot(
cmStateSnapshot const& originSnapshot, std::string const& fileName);
cmStateSnapshot CreatePolicyScopeSnapshot(
cmStateSnapshot const& originSnapshot);
cmStateSnapshot Pop(cmStateSnapshot const& originSnapshot);
static cmStateEnums::CacheEntryType StringToCacheEntryType(const char*);
static const char* CacheEntryTypeToString(cmStateEnums::CacheEntryType);
......
......@@ -125,7 +125,7 @@ cmStateSnapshot cmStateSnapshot::GetCallStackBottom() const
return cmStateSnapshot(this->State, pos);
}
void cmStateSnapshot::PushPolicy(cmPolicies::PolicyMap entry, bool weak)
void cmStateSnapshot::PushPolicy(cmPolicies::PolicyMap const& entry, bool weak)
{
cmStateDetail::PositionType pos = this->Position;
pos->Policies = this->State->PolicyStack.Push(
......