diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2008-07-10 21:20:14 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2008-07-10 21:20:14 (GMT) |
commit | 0143b832641d1529ee8d34a9f1d59a01da3ab1dc (patch) | |
tree | 90f3a827ceeef21df5ebec2cbead89ad05349b08 /Source/kwsys/RegularExpression.cxx | |
parent | 06d38d313f6d88941650e0b12181aad30bc5aa93 (diff) | |
download | CMake-0143b832641d1529ee8d34a9f1d59a01da3ab1dc.zip CMake-0143b832641d1529ee8d34a9f1d59a01da3ab1dc.tar.gz CMake-0143b832641d1529ee8d34a9f1d59a01da3ab1dc.tar.bz2 |
COMP: remove warning and check for assignment to itself in operator=
Diffstat (limited to 'Source/kwsys/RegularExpression.cxx')
-rw-r--r-- | Source/kwsys/RegularExpression.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/kwsys/RegularExpression.cxx b/Source/kwsys/RegularExpression.cxx index 3566a65..6a62351 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; |