summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.cxx
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2014-02-07 20:46:27 (GMT)
committerBrad King <brad.king@kitware.com>2014-03-08 18:05:34 (GMT)
commit23e9b80f585db1cc68846a54e6e5844f970215ea (patch)
tree7afc07b02465518dd34efafefe114ff573cd005b /Source/cmSystemTools.cxx
parent8455dd0a9a6c766870c7ddcb186e49a8a5db1416 (diff)
downloadCMake-23e9b80f585db1cc68846a54e6e5844f970215ea.zip
CMake-23e9b80f585db1cc68846a54e6e5844f970215ea.tar.gz
CMake-23e9b80f585db1cc68846a54e6e5844f970215ea.tar.bz2
stringapi: Use strings for globbing parameters
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r--Source/cmSystemTools.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 18eb62e..9b35e61 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -971,13 +971,14 @@ std::string cmSystemTools::ComputeStringMD5(const std::string& input)
#endif
}
-void cmSystemTools::Glob(const char *directory, const char *regexp,
+void cmSystemTools::Glob(const std::string& directory,
+ const std::string& regexp,
std::vector<std::string>& files)
{
cmsys::Directory d;
- cmsys::RegularExpression reg(regexp);
+ cmsys::RegularExpression reg(regexp.c_str());
- if (d.Load(directory))
+ if (d.Load(directory.c_str()))
{
size_t numf;
unsigned int i;
@@ -994,14 +995,13 @@ void cmSystemTools::Glob(const char *directory, const char *regexp,
}
-void cmSystemTools::GlobDirs(const char *fullPath,
+void cmSystemTools::GlobDirs(const std::string& path,
std::vector<std::string>& files)
{
- std::string path = fullPath;
std::string::size_type pos = path.find("/*");
if(pos == std::string::npos)
{
- files.push_back(fullPath);
+ files.push_back(path);
return;
}
std::string startPath = path.substr(0, pos);