summaryrefslogtreecommitdiffstats
path: root/Source/cmRegularExpression.h
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2002-10-04 22:16:13 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2002-10-04 22:16:13 (GMT)
commita518fed4e35bc7c630be548c62f756121dba0b8b (patch)
tree4dc7659acd9a658510d6d511f6a30eccb203830f /Source/cmRegularExpression.h
parent77616437d1f348bf20c7714c156fd23f19323d4b (diff)
downloadCMake-a518fed4e35bc7c630be548c62f756121dba0b8b.zip
CMake-a518fed4e35bc7c630be548c62f756121dba0b8b.tar.gz
CMake-a518fed4e35bc7c630be548c62f756121dba0b8b.tar.bz2
Try to improve source group interface
Diffstat (limited to 'Source/cmRegularExpression.h')
-rw-r--r--Source/cmRegularExpression.h19
1 files changed, 11 insertions, 8 deletions
diff --git a/Source/cmRegularExpression.h b/Source/cmRegularExpression.h
index 86417fb..b8a9963 100644
--- a/Source/cmRegularExpression.h
+++ b/Source/cmRegularExpression.h
@@ -182,7 +182,7 @@ public:
/**
* Instantiate cmRegularExpression with program=NULL.
*/
- inline cmRegularExpression ();
+ inline cmRegularExpression ();
/**
* Instantiate cmRegularExpression with compiled char*.
@@ -215,7 +215,7 @@ public:
* Matches the regular expression to the given std string.
* Returns true if found, and sets start and end indexes accordingly.
*/
- bool find (std::string const&);
+ bool find (std::string const&);
/**
* Index to start of first find.
@@ -253,7 +253,7 @@ public:
/**
* Marks the regular expression as invalid.
*/
- inline void set_invalid();
+ inline void set_invalid();
/**
* Destructor.
@@ -266,10 +266,10 @@ public:
private:
const char* startp[NSUBEXP];
const char* endp[NSUBEXP];
- char regstart; // Internal use only
- char reganch; // Internal use only
- const char* regmust; // Internal use only
- int regmlen; // Internal use only
+ char regstart; // Internal use only
+ char reganch; // Internal use only
+ const char* regmust; // Internal use only
+ int regmlen; // Internal use only
char* program;
int progsize;
const char* searchstring;
@@ -290,7 +290,10 @@ inline cmRegularExpression::cmRegularExpression ()
inline cmRegularExpression::cmRegularExpression (const char* s)
{
this->program = 0;
- compile(s);
+ if ( s )
+ {
+ this->compile(s);
+ }
}
/**