RX: Inherited RX fixes from clog
This commit is contained in:
29
src/RX.cpp
29
src/RX.cpp
@@ -29,6 +29,14 @@
|
||||
#include <string.h>
|
||||
#include <RX.h>
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
RX::RX ()
|
||||
: _compiled (false)
|
||||
, _pattern ("")
|
||||
, _case_sensitive (false)
|
||||
{
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
RX::RX (
|
||||
const std::string& pattern,
|
||||
@@ -40,6 +48,14 @@ RX::RX (
|
||||
compile ();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
RX::RX (const RX& other)
|
||||
{
|
||||
_compiled = false;
|
||||
_pattern = other._pattern;
|
||||
_case_sensitive = other._case_sensitive;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
RX::~RX ()
|
||||
{
|
||||
@@ -47,6 +63,19 @@ RX::~RX ()
|
||||
regfree (&_regex);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
RX& RX::operator= (const RX& other)
|
||||
{
|
||||
if (this != &other)
|
||||
{
|
||||
_compiled = false;
|
||||
_pattern = other._pattern;
|
||||
_case_sensitive = other._case_sensitive;
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void RX::compile ()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user