From a3c2d3280234fb5883f3e2ee0a3b980fe77f9b90 Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 19 Feb 2008 09:09:46 -0500 Subject: [PATCH] COMP: Fix HP warning about cmTargetInternalPointer::operator= checking for self-assignment. --- Source/cmTarget.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index d534a0426..4e3a34582 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -3459,8 +3459,9 @@ cmTargetInternalPointer::~cmTargetInternalPointer() //---------------------------------------------------------------------------- cmTargetInternalPointer& -cmTargetInternalPointer::operator=(cmTargetInternalPointer const&) +cmTargetInternalPointer::operator=(cmTargetInternalPointer const& r) { + if(this == &r) { return *this; } // avoid warning on HP about self check // Ideally cmTarget instances should never be copied. However until // we can make a sweep to remove that, this copy constructor avoids // allowing the resources (Internals) to be copied.