summaryrefslogtreecommitdiff
path: root/Source/kwsys/RegularExpression.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2008-07-10 17:20:14 -0400
committerBill Hoffman <bill.hoffman@kitware.com>2008-07-10 17:20:14 -0400
commit0143b832641d1529ee8d34a9f1d59a01da3ab1dc (patch)
tree90f3a827ceeef21df5ebec2cbead89ad05349b08 /Source/kwsys/RegularExpression.cxx
parent06d38d313f6d88941650e0b12181aad30bc5aa93 (diff)
downloadcmake-0143b832641d1529ee8d34a9f1d59a01da3ab1dc.tar.gz
COMP: remove warning and check for assignment to itself in operator=
Diffstat (limited to 'Source/kwsys/RegularExpression.cxx')
-rw-r--r--Source/kwsys/RegularExpression.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/kwsys/RegularExpression.cxx b/Source/kwsys/RegularExpression.cxx
index 3566a651b5..6a623513e6 100644
--- a/Source/kwsys/RegularExpression.cxx
+++ b/Source/kwsys/RegularExpression.cxx
@@ -77,6 +77,10 @@ RegularExpression::RegularExpression (const RegularExpression& rxp) {
// operator= -- Copies the given regular expression.
RegularExpression& RegularExpression::operator= (const RegularExpression& rxp)
{
+ if(this == &rxp)
+ {
+ return *this;
+ }
if ( !rxp.program )
{
this->program = 0;