From 3b42dceffb87a521a63e6a84c269b6f6329e279f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Thu, 27 Jul 2017 19:08:55 +0000 Subject: [PATCH] [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 --- reactos/sdk/lib/atl/atlcoll.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/reactos/sdk/lib/atl/atlcoll.h b/reactos/sdk/lib/atl/atlcoll.h index faab14a9887..ad8c082d54c 100644 --- a/reactos/sdk/lib/atl/atlcoll.h +++ b/reactos/sdk/lib/atl/atlcoll.h @@ -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::CNode* CAtlList::CreateNode( { GetFreeNode(); - CNode* NewNode = GetFreeNode(); + CNode* NewNode = m_FreeNode; CNode* NextFree = m_FreeNode->m_Next; NewNode = new CNode(element);