summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-07-29 17:26:19 (GMT)
committerBrad King <brad.king@kitware.com>2014-07-29 19:06:24 (GMT)
commit143b40051a71c2f53e487be69069f1932ccc25d1 (patch)
treef55c58b501b6a287863c171db13c45e59766186a /Source
parent38065563b6fb0093004d0c89b5de0f82a76b5a31 (diff)
downloadCMake-143b40051a71c2f53e487be69069f1932ccc25d1.zip
CMake-143b40051a71c2f53e487be69069f1932ccc25d1.tar.gz
CMake-143b40051a71c2f53e487be69069f1932ccc25d1.tar.bz2
VS: Convert 'WriteSource' tool argument to std::string
Diffstat (limited to 'Source')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx8
-rw-r--r--Source/cmVisualStudio10TargetGenerator.h4
2 files changed, 6 insertions, 6 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 5674317..ca6c41e 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -998,7 +998,7 @@ WriteGroupSources(const char* name,
}
void cmVisualStudio10TargetGenerator::WriteSource(
- const char* tool, cmSourceFile const* sf, const char* end)
+ std::string const& tool, cmSourceFile const* sf, const char* end)
{
// Visual Studio tools append relative paths to the current dir, as in:
//
@@ -1055,7 +1055,7 @@ void cmVisualStudio10TargetGenerator::WriteSource(
}
void cmVisualStudio10TargetGenerator::WriteSources(
- const char* tool, std::vector<cmSourceFile const*> const& sources)
+ std::string const& tool, std::vector<cmSourceFile const*> const& sources)
{
for(std::vector<cmSourceFile const*>::const_iterator
si = sources.begin(); si != sources.end(); ++si)
@@ -1086,7 +1086,7 @@ void cmVisualStudio10TargetGenerator::WriteAllSources()
si != objectSources.end(); ++si)
{
const std::string& lang = (*si)->GetLanguage();
- const char* tool = NULL;
+ std::string tool;
if (lang == "C"|| lang == "CXX")
{
tool = "ClCompile";
@@ -1101,7 +1101,7 @@ void cmVisualStudio10TargetGenerator::WriteAllSources()
tool = "ResourceCompile";
}
- if (tool)
+ if (!tool.empty())
{
this->WriteSource(tool, *si, " ");
if (this->OutputSourceSpecificFlags(*si))
diff --git a/Source/cmVisualStudio10TargetGenerator.h b/Source/cmVisualStudio10TargetGenerator.h
index 7a329cb..23d86da 100644
--- a/Source/cmVisualStudio10TargetGenerator.h
+++ b/Source/cmVisualStudio10TargetGenerator.h
@@ -57,9 +57,9 @@ private:
void WriteProjectConfigurations();
void WriteProjectConfigurationValues();
void WriteMSToolConfigurationValues(std::string const& config);
- void WriteSource(const char* tool, cmSourceFile const* sf,
+ void WriteSource(std::string const& tool, cmSourceFile const* sf,
const char* end = 0);
- void WriteSources(const char* tool,
+ void WriteSources(std::string const& tool,
std::vector<cmSourceFile const*> const&);
void WriteAllSources();
void WriteDotNetReferences();