summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/kwsys/CommandLineArguments.cxx6
-rw-r--r--Source/kwsys/RegularExpression.cxx3
-rw-r--r--Source/kwsys/RegularExpression.hxx.in18
-rw-r--r--Source/kwsys/SystemTools.cxx10
4 files changed, 22 insertions, 15 deletions
diff --git a/Source/kwsys/CommandLineArguments.cxx b/Source/kwsys/CommandLineArguments.cxx
index a97f7a8..dc9f01d 100644
--- a/Source/kwsys/CommandLineArguments.cxx
+++ b/Source/kwsys/CommandLineArguments.cxx
@@ -67,10 +67,10 @@ class CommandLineArgumentsInternal
{
public:
CommandLineArgumentsInternal()
+ : UnknownArgumentCallback{ KWSYS_NULLPTR }
+ , ClientData{ KWSYS_NULLPTR }
+ , LastArgument{ 0 }
{
- this->UnknownArgumentCallback = KWSYS_NULLPTR;
- this->ClientData = KWSYS_NULLPTR;
- this->LastArgument = 0;
}
typedef CommandLineArgumentsVectorOfStrings VectorOfStrings;
diff --git a/Source/kwsys/RegularExpression.cxx b/Source/kwsys/RegularExpression.cxx
index 5f84b19..3e10765 100644
--- a/Source/kwsys/RegularExpression.cxx
+++ b/Source/kwsys/RegularExpression.cxx
@@ -337,7 +337,6 @@ bool RegularExpression::compile(const char* exp)
{
const char* scan;
const char* longest;
- size_t len;
int flags;
if (exp == KWSYS_NULLPTR) {
@@ -412,7 +411,7 @@ bool RegularExpression::compile(const char* exp)
//
if (flags & SPSTART) {
longest = KWSYS_NULLPTR;
- len = 0;
+ size_t len = 0;
for (; scan != KWSYS_NULLPTR; scan = regnext(scan))
if (OP(scan) == EXACTLY && strlen(OPERAND(scan)) >= len) {
longest = OPERAND(scan);
diff --git a/Source/kwsys/RegularExpression.hxx.in b/Source/kwsys/RegularExpression.hxx.in
index b7b93f9..ed86418 100644
--- a/Source/kwsys/RegularExpression.hxx.in
+++ b/Source/kwsys/RegularExpression.hxx.in
@@ -407,8 +407,12 @@ private:
* Create an empty regular expression.
*/
inline RegularExpression::RegularExpression()
+ : regstart{}
+ , reganch{}
+ , regmust{}
+ , program{ 0 }
+ , progsize{}
{
- this->program = 0;
}
/**
@@ -416,8 +420,12 @@ inline RegularExpression::RegularExpression()
* compiles s.
*/
inline RegularExpression::RegularExpression(const char* s)
+ : regstart{}
+ , reganch{}
+ , regmust{}
+ , program{ 0 }
+ , progsize{}
{
- this->program = 0;
if (s) {
this->compile(s);
}
@@ -428,8 +436,12 @@ inline RegularExpression::RegularExpression(const char* s)
* compiles s.
*/
inline RegularExpression::RegularExpression(const std::string& s)
+ : regstart{}
+ , reganch{}
+ , regmust{}
+ , program{ 0 }
+ , progsize{}
{
- this->program = 0;
this->compile(s);
}
diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx
index ae7a18a..36f24c7 100644
--- a/Source/kwsys/SystemTools.cxx
+++ b/Source/kwsys/SystemTools.cxx
@@ -3403,11 +3403,7 @@ static void SystemToolsAppendComponents(
out_components.emplace_back(std::move(*i));
}
} else if (!i->empty() && *i != cur) {
-#if __cplusplus >= 201103L || (defined(_MSVC_LANG) && _MSVC_LANG >= 201103L)
- out_components.push_back(std::move(*i));
-#else
- out_components.push_back(*i);
-#endif
+ out_components.emplace_back(std::move(*i));
}
}
}
@@ -4743,7 +4739,7 @@ void SystemTools::ClassInitialize()
// Test progressively shorter logical-to-physical mappings.
std::string cwd_str = cwd;
std::string pwd_path;
- Realpath(pwd_str.c_str(), pwd_path);
+ Realpath(pwd_str, pwd_path);
while (cwd_str == pwd_path && cwd_str != pwd_str) {
// The current pair of paths is a working logical mapping.
cwd_changed = cwd_str;
@@ -4753,7 +4749,7 @@ void SystemTools::ClassInitialize()
// mapping still works.
pwd_str = SystemTools::GetFilenamePath(pwd_str);
cwd_str = SystemTools::GetFilenamePath(cwd_str);
- Realpath(pwd_str.c_str(), pwd_path);
+ Realpath(pwd_str, pwd_path);
}
// Add the translation to keep the logical path name.