Author: gedmurphy
Date: Mon Oct 12 20:33:33 2015
New Revision: 69518
URL:
http://svn.reactos.org/svn/reactos?rev=69518&view=rev
Log:
[ATL]
Various g++ fixes
Modified:
trunk/reactos/lib/atl/atlcoll.h
trunk/reactos/lib/atl/atlmem.h
trunk/reactos/lib/atl/atlsimpstr.h
trunk/reactos/lib/atl/atlstr.h
Modified: trunk/reactos/lib/atl/atlcoll.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/atl/atlcoll.h?rev=6951…
==============================================================================
--- trunk/reactos/lib/atl/atlcoll.h [iso-8859-1] (original)
+++ trunk/reactos/lib/atl/atlcoll.h [iso-8859-1] Mon Oct 12 20:33:33 2015
@@ -136,7 +136,6 @@
public CDefaultElementTraits<T>
{
};
-
template<typename E, class ETraits = CElementTraits<E>>
class CAtlList
@@ -209,13 +208,12 @@
template<typename E, class ETraits>
CAtlList< E, ETraits >::CAtlList(_In_ UINT nBlockSize) :
- m_NumElements(0),
+ m_Blocks(NULL),
+ m_BlockSize(nBlockSize),
m_HeadNode(NULL),
m_TailNode(NULL),
m_FreeNode(NULL),
- m_Blocks(NULL),
-
- m_BlockSize(nBlockSize)
+ m_NumElements(0)
{
ATLASSERT(nBlockSize > 0);
}
Modified: trunk/reactos/lib/atl/atlmem.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/atl/atlmem.h?rev=69518…
==============================================================================
--- trunk/reactos/lib/atl/atlmem.h [iso-8859-1] (original)
+++ trunk/reactos/lib/atl/atlmem.h [iso-8859-1] Mon Oct 12 20:33:33 2015
@@ -4,12 +4,6 @@
#pragma once
#include "atlcore.h"
-// HACK HACK! This must be placed in another global ATL header!!
-// Placement new operator
-void *operator new (size_t, void *buf)
-{
- return buf;
-}
namespace ATL
{
Modified: trunk/reactos/lib/atl/atlsimpstr.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/atl/atlsimpstr.h?rev=6…
==============================================================================
--- trunk/reactos/lib/atl/atlsimpstr.h [iso-8859-1] (original)
+++ trunk/reactos/lib/atl/atlsimpstr.h [iso-8859-1] Mon Oct 12 20:33:33 2015
@@ -102,20 +102,9 @@
wchar_t achNil[2];
};
-template< typename BaseType = char >
+
+template< typename BaseType = wchar_t >
class ChTraitsBase
-{
-public:
- typedef char XCHAR;
- typedef LPSTR PXSTR;
- typedef LPCSTR PCXSTR;
- typedef wchar_t YCHAR;
- typedef LPWSTR PYSTR;
- typedef LPCWSTR PCYSTR;
-};
-
-template<>
-class ChTraitsBase< wchar_t >
{
public:
typedef wchar_t XCHAR;
@@ -126,8 +115,6 @@
typedef LPCSTR PCYSTR;
};
-
-
template< typename BaseType, bool t_bMFCDLL = false>
class CSimpleStringT
{
@@ -156,12 +143,6 @@
Attach(pNewData);
}
- CSimpleStringT(_In_ const CSimpleStringT<BaseType, !t_bMFCDLL>& strSrc)
- {
- CStringData* pSrcData = strSrc.GetData();
- CStringData* pNewData = CloneData(pSrcData);
- Attach(pNewData);
- }
CSimpleStringT& operator=(_In_opt_z_ PCXSTR pszSrc)
{
Modified: trunk/reactos/lib/atl/atlstr.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/atl/atlstr.h?rev=69518…
==============================================================================
--- trunk/reactos/lib/atl/atlstr.h [iso-8859-1] (original)
+++ trunk/reactos/lib/atl/atlstr.h [iso-8859-1] Mon Oct 12 20:33:33 2015
@@ -98,7 +98,15 @@
};
-template <typename _BaseType = char, class StringIterator =
ChTraitsOS<_BaseType>>
+template< typename _CharType = wchar_t >
+class ChTraitsOS :
+ public ChTraitsBase < _CharType >
+{
+
+};
+
+
+template <typename _BaseType = wchar_t, class StringIterator =
ChTraitsOS<_BaseType>>
class StrTraitATL :
public StringIterator
{