Reactos

[ATL] Rename CHeapPtr data member, since it is public

+22 -22
+22 -22
sdk/lib/atl/atlalloc.h
··· 98 98 { 99 99 public: 100 100 CHeapPtr() : 101 - m_Data(NULL) 101 + m_pData(NULL) 102 102 { 103 103 } 104 104 105 105 explicit CHeapPtr(T *lp) : 106 - m_Data(lp) 106 + m_pData(lp) 107 107 { 108 108 } 109 109 110 110 explicit CHeapPtr(CHeapPtr<T, Allocator> &lp) 111 111 { 112 - m_Data = lp.Detach(); 112 + m_pData = lp.Detach(); 113 113 } 114 114 115 115 ~CHeapPtr() ··· 119 119 120 120 CHeapPtr<T, Allocator>& operator = (CHeapPtr<T, Allocator> &lp) 121 121 { 122 - if (lp.m_Data != m_Data) 122 + if (lp.m_pData != m_pData) 123 123 Attach(lp.Detach()); 124 124 return *this; 125 125 } 126 126 127 127 bool AllocateBytes(_In_ size_t nBytes) 128 128 { 129 - ATLASSERT(m_Data == NULL); 130 - m_Data = static_cast<T*>(Allocator::Allocate(nBytes)); 131 - return m_Data != NULL; 129 + ATLASSERT(m_pData == NULL); 130 + m_pData = static_cast<T*>(Allocator::Allocate(nBytes)); 131 + return m_pData != NULL; 132 132 } 133 133 134 134 bool ReallocateBytes(_In_ size_t nBytes) 135 135 { 136 - T* newData = static_cast<T*>(Allocator::Reallocate(m_Data, nBytes)); 136 + T* newData = static_cast<T*>(Allocator::Reallocate(m_pData, nBytes)); 137 137 if (newData == NULL) 138 138 return false; 139 - m_Data = newData; 139 + m_pData = newData; 140 140 return true; 141 141 } 142 142 ··· 152 152 153 153 void Free() 154 154 { 155 - if (m_Data) 155 + if (m_pData) 156 156 { 157 - Allocator::Free(m_Data); 158 - m_Data = NULL; 157 + Allocator::Free(m_pData); 158 + m_pData = NULL; 159 159 } 160 160 } 161 161 162 162 void Attach(T *lp) 163 163 { 164 - Allocator::Free(m_Data); 165 - m_Data = lp; 164 + Allocator::Free(m_pData); 165 + m_pData = lp; 166 166 } 167 167 168 168 T *Detach() 169 169 { 170 - T *saveP = m_Data; 171 - m_Data = NULL; 170 + T *saveP = m_pData; 171 + m_pData = NULL; 172 172 return saveP; 173 173 } 174 174 175 175 T **operator &() 176 176 { 177 - ATLASSERT(m_Data == NULL); 178 - return &m_Data; 177 + ATLASSERT(m_pData == NULL); 178 + return &m_pData; 179 179 } 180 180 181 181 operator T* () const 182 182 { 183 - return m_Data; 183 + return m_pData; 184 184 } 185 185 186 186 T* operator->() const 187 187 { 188 - return m_Data; 188 + return m_pData; 189 189 } 190 190 191 - protected: 192 - T *m_Data; 191 + public: 192 + T *m_pData; 193 193 }; 194 194