[ATL]: - Both the CAtlList class and its helper class CNode do not support copy construction. - Remove a redundant call to GetFreeNode().

CORE-13597

svn path=/trunk/; revision=75427
This commit is contained in:
Hermès Bélusca-Maïto 2017-07-27 19:08:55 +00:00
parent 42336ccb3c
commit 3b42dceffb

View file

@ -155,6 +155,11 @@ private:
m_Element(Element)
{
}
/* The CNode class does not support construction by copy */
private:
CNode(_In_ const CNode&);
CNode& operator=(_In_ const CNode&);
};
private:
@ -165,6 +170,11 @@ private:
CNode* m_FreeNode;
size_t m_NumElements;
/* The CAtlList class does not support construction by copy */
private:
CAtlList(_In_ const CAtlList&);
CAtlList& operator=(_In_ const CAtlList&);
public:
CAtlList(_In_ UINT nBlockSize = 10);
~CAtlList();
@ -481,7 +491,7 @@ typename CAtlList<E, ETraits>::CNode* CAtlList<E, ETraits>::CreateNode(
{
GetFreeNode();
CNode* NewNode = GetFreeNode();
CNode* NewNode = m_FreeNode;
CNode* NextFree = m_FreeNode->m_Next;
NewNode = new CNode(element);