summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/RegularExpression.hxx.in
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-09-18 13:26:40 (GMT)
committerBrad King <brad.king@kitware.com>2019-09-18 13:26:40 (GMT)
commit56879273dc87a69e1d1491a73e0f74cd4424494c (patch)
treecd9c73956f1a4d1d1603267864b6beff34fdf938 /Source/kwsys/RegularExpression.hxx.in
parent45b7d5284e11cb34885b756bee8dedeb94fc16cb (diff)
parent3327c0402a1ce31615c7ad22c5ff5d5330fb75da (diff)
downloadCMake-56879273dc87a69e1d1491a73e0f74cd4424494c.zip
CMake-56879273dc87a69e1d1491a73e0f74cd4424494c.tar.gz
CMake-56879273dc87a69e1d1491a73e0f74cd4424494c.tar.bz2
Merge branch 'upstream-KWSys' into update-kwsys
# By KWSys Upstream * upstream-KWSys: KWSys 2019-09-18 (c6bc38c1)
Diffstat (limited to 'Source/kwsys/RegularExpression.hxx.in')
-rw-r--r--Source/kwsys/RegularExpression.hxx.in37
1 files changed, 19 insertions, 18 deletions
diff --git a/Source/kwsys/RegularExpression.hxx.in b/Source/kwsys/RegularExpression.hxx.in
index ed86418..df7eb45 100644
--- a/Source/kwsys/RegularExpression.hxx.in
+++ b/Source/kwsys/RegularExpression.hxx.in
@@ -71,9 +71,9 @@ private:
*/
inline RegularExpressionMatch::RegularExpressionMatch()
{
- startp[0] = 0;
- endp[0] = 0;
- searchstring = 0;
+ startp[0] = nullptr;
+ endp[0] = nullptr;
+ searchstring = nullptr;
}
/**
@@ -81,7 +81,7 @@ inline RegularExpressionMatch::RegularExpressionMatch()
*/
inline bool RegularExpressionMatch::isValid() const
{
- return (this->startp[0] != 0);
+ return (this->startp[0] != nullptr);
}
/**
@@ -89,9 +89,9 @@ inline bool RegularExpressionMatch::isValid() const
*/
inline void RegularExpressionMatch::clear()
{
- startp[0] = 0;
- endp[0] = 0;
- searchstring = 0;
+ startp[0] = nullptr;
+ endp[0] = nullptr;
+ searchstring = nullptr;
}
/**
@@ -135,7 +135,7 @@ inline std::string::size_type RegularExpressionMatch::end(int n) const
*/
inline std::string RegularExpressionMatch::match(int n) const
{
- if (this->startp[n] == 0) {
+ if (this->startp[n] == nullptr) {
return std::string();
} else {
return std::string(
@@ -230,10 +230,11 @@ inline std::string RegularExpressionMatch::match(int n) const
* into the object's private data fields. The == and != operators only check
* the to see if the compiled regular expression is the same, and the
* deep_equal functions also checks to see if the start and end pointers are
- * the same. The is_valid function returns false if program is set to NULL,
- * (i.e. there is no valid compiled expression). The set_invalid function
- * sets the program to NULL (Warning: this deletes the compiled expression).
- * The following examples may help clarify regular expression usage:
+ * the same. The is_valid function returns false if program is set to
+ * nullptr, (i.e. there is no valid compiled expression). The set_invalid
+ * function sets the program to nullptr (Warning: this deletes the compiled
+ * expression). The following examples may help clarify regular expression
+ * usage:
*
* * The regular expression "^hello" matches a "hello" only at the
* beginning of a line. It would match "hello there" but not "hi,
@@ -288,7 +289,7 @@ class @KWSYS_NAMESPACE@_EXPORT RegularExpression
{
public:
/**
- * Instantiate RegularExpression with program=NULL.
+ * Instantiate RegularExpression with program=nullptr.
*/
inline RegularExpression();
@@ -410,7 +411,7 @@ inline RegularExpression::RegularExpression()
: regstart{}
, reganch{}
, regmust{}
- , program{ 0 }
+ , program{ nullptr }
, progsize{}
{
}
@@ -423,7 +424,7 @@ inline RegularExpression::RegularExpression(const char* s)
: regstart{}
, reganch{}
, regmust{}
- , program{ 0 }
+ , program{ nullptr }
, progsize{}
{
if (s) {
@@ -439,7 +440,7 @@ inline RegularExpression::RegularExpression(const std::string& s)
: regstart{}
, reganch{}
, regmust{}
- , program{ 0 }
+ , program{ nullptr }
, progsize{}
{
this->compile(s);
@@ -545,7 +546,7 @@ inline bool RegularExpression::operator!=(const RegularExpression& r) const
*/
inline bool RegularExpression::is_valid() const
{
- return (this->program != 0);
+ return (this->program != nullptr);
}
inline void RegularExpression::set_invalid()
@@ -553,7 +554,7 @@ inline void RegularExpression::set_invalid()
//#ifndef _WIN32
delete[] this->program;
//#endif
- this->program = 0;
+ this->program = nullptr;
}
} // namespace @KWSYS_NAMESPACE@