summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudioWCEPlatformParser.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmVisualStudioWCEPlatformParser.cxx')
-rw-r--r--Source/cmVisualStudioWCEPlatformParser.cxx28
1 files changed, 14 insertions, 14 deletions
diff --git a/Source/cmVisualStudioWCEPlatformParser.cxx b/Source/cmVisualStudioWCEPlatformParser.cxx
index d8d0da9..8aa5384 100644
--- a/Source/cmVisualStudioWCEPlatformParser.cxx
+++ b/Source/cmVisualStudioWCEPlatformParser.cxx
@@ -7,14 +7,15 @@
#include <utility>
#include "cmGlobalVisualStudioGenerator.h"
+#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
int cmVisualStudioWCEPlatformParser::ParseVersion(const char* version)
{
const std::string registryBase =
cmGlobalVisualStudioGenerator::GetRegistryBase(version);
- const std::string vckey = registryBase + "\\Setup\\VC;ProductDir";
- const std::string vskey = registryBase + "\\Setup\\VS;ProductDir";
+ const std::string vckey = cmStrCat(registryBase, "\\Setup\\VC;ProductDir");
+ const std::string vskey = cmStrCat(registryBase, "\\Setup\\VS;ProductDir");
if (!cmSystemTools::ReadRegistryValue(vckey, this->VcInstallDir,
cmSystemTools::KeyWOW64_32) ||
@@ -24,11 +25,10 @@ int cmVisualStudioWCEPlatformParser::ParseVersion(const char* version)
}
cmSystemTools::ConvertToUnixSlashes(this->VcInstallDir);
cmSystemTools::ConvertToUnixSlashes(this->VsInstallDir);
- this->VcInstallDir.append("/");
- this->VsInstallDir.append("/");
+ this->VcInstallDir.append("//");
const std::string configFilename =
- this->VcInstallDir + "vcpackages/WCE.VCPlatform.config";
+ cmStrCat(this->VcInstallDir, "vcpackages/WCE.VCPlatform.config");
return this->ParseFile(configFilename.c_str());
}
@@ -39,7 +39,7 @@ std::string cmVisualStudioWCEPlatformParser::GetOSVersion() const
return OSMajorVersion;
}
- return OSMajorVersion + "." + OSMinorVersion;
+ return cmStrCat(OSMajorVersion, '.', OSMinorVersion);
}
const char* cmVisualStudioWCEPlatformParser::GetArchitectureFamily() const
@@ -61,14 +61,14 @@ void cmVisualStudioWCEPlatformParser::StartElement(const std::string& name,
this->CharacterData.clear();
- if (name == "PlatformData") {
+ if (name == "PlatformData"_s) {
this->PlatformName.clear();
this->OSMajorVersion.clear();
this->OSMinorVersion.clear();
this->Macros.clear();
}
- if (name == "Macro") {
+ if (name == "Macro"_s) {
std::string macroName;
std::string macroValue;
@@ -83,7 +83,7 @@ void cmVisualStudioWCEPlatformParser::StartElement(const std::string& name,
if (!macroName.empty()) {
this->Macros[macroName] = macroValue;
}
- } else if (name == "Directories") {
+ } else if (name == "Directories"_s) {
for (const char** attr = attributes; *attr; attr += 2) {
if (strcmp(attr[0], "Include") == 0) {
this->Include = attr[1];
@@ -99,7 +99,7 @@ void cmVisualStudioWCEPlatformParser::StartElement(const std::string& name,
void cmVisualStudioWCEPlatformParser::EndElement(const std::string& name)
{
if (!this->RequiredName) {
- if (name == "PlatformName") {
+ if (name == "PlatformName"_s) {
this->AvailablePlatforms.push_back(this->CharacterData);
}
return;
@@ -109,13 +109,13 @@ void cmVisualStudioWCEPlatformParser::EndElement(const std::string& name)
return;
}
- if (name == "PlatformName") {
+ if (name == "PlatformName"_s) {
this->PlatformName = this->CharacterData;
- } else if (name == "OSMajorVersion") {
+ } else if (name == "OSMajorVersion"_s) {
this->OSMajorVersion = this->CharacterData;
- } else if (name == "OSMinorVersion") {
+ } else if (name == "OSMinorVersion"_s) {
this->OSMinorVersion = this->CharacterData;
- } else if (name == "Platform") {
+ } else if (name == "Platform"_s) {
if (this->PlatformName == this->RequiredName) {
this->FoundRequiredName = true;
}