Skip to content

Commit

Permalink
r18
Browse files Browse the repository at this point in the history
  • Loading branch information
SkinVista committed Jan 31, 2017
1 parent b1a083d commit bca2a67
Show file tree
Hide file tree
Showing 52 changed files with 441 additions and 641 deletions.
4 changes: 2 additions & 2 deletions Envy/AlbumFolder.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// AlbumFolder.cpp
//
// This file is part of Envy (getenvy.com) © 2016
// This file is part of Envy (getenvy.com) © 2016-2017
// Portions copyright PeerProject 2008-2014 and Shareaza 2002-2007
//
// Envy is free software. You may redistribute and/or modify it
Expand Down Expand Up @@ -1347,7 +1347,7 @@ void CAlbumFolder::Serialize(CArchive& ar, int nVersion)

while ( nCount-- > 0 )
{
auto_ptr< CAlbumFolder > pFolder( new CAlbumFolder( this, NULL, (LPCTSTR)1 ) );
unique_ptr< CAlbumFolder > pFolder( new CAlbumFolder( this, NULL, (LPCTSTR)1 ) );
pFolder->Serialize( ar, nVersion );
m_pFolders.AddTail( pFolder.release() );
}
Expand Down
35 changes: 0 additions & 35 deletions Envy/Augment/Augment.hpp

This file was deleted.

168 changes: 0 additions & 168 deletions Envy/Augment/auto_ptr.hpp

This file was deleted.

4 changes: 2 additions & 2 deletions Envy/BENode.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// BENode.cpp
//
// This file is part of Envy (getenvy.com) © 2016
// This file is part of Envy (getenvy.com) © 2016-2017
// Portions copyright PeerProject 2008-2015 and Shareaza 2002-2008
//
// Envy is free software. You may redistribute and/or modify it
Expand Down Expand Up @@ -114,7 +114,7 @@ CBENode* CBENode::Add(LPCBYTE pKey, size_t nKey)
break;
}

// auto_ptr< CBENode > pNew( new CBENode );
// unique_ptr< CBENode > pNew( new CBENode );
// CBENode* pNew_ = pNew.get();

CAutoPtr< CBENode > pNew( new CBENode );
Expand Down
6 changes: 3 additions & 3 deletions Envy/BTInfo.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// BTInfo.cpp
//
// This file is part of Envy (getenvy.com) © 2016
// This file is part of Envy (getenvy.com) © 2016-2017
// Portions copyright PeerProject 2008-2015 and Shareaza 2002-2008
//
// Envy is free software. You may redistribute and/or modify it
Expand Down Expand Up @@ -685,7 +685,7 @@ BOOL CBTInfo::CheckInfoData()

if ( ! m_pSource.m_nLength ) return FALSE;

auto_ptr< CBENode > pNode ( CBENode::Decode( &m_pSource ) );
unique_ptr< CBENode > pNode ( CBENode::Decode( &m_pSource ) );
if ( ! pNode.get() )
return FALSE;

Expand Down Expand Up @@ -717,7 +717,7 @@ BOOL CBTInfo::CheckInfoData()

BOOL CBTInfo::LoadTorrentBuffer(const CBuffer* pBuffer)
{
auto_ptr< CBENode > pNode ( CBENode::Decode( pBuffer ) );
unique_ptr< CBENode > pNode ( CBENode::Decode( pBuffer ) );
if ( ! pNode.get() )
{
theApp.Message( MSG_ERROR, L"[BT] Failed to decode torrent data: %s", pBuffer->ReadString( (size_t)-1 ) );
Expand Down
4 changes: 2 additions & 2 deletions Envy/BTPacket.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// BTPacket.h
//
// This file is part of Envy (getenvy.com) © 2016
// This file is part of Envy (getenvy.com) © 2016-2017
// Portions copyright PeerProject 2008-2014 and Shareaza 2002-2007
//
// Envy is free software. You may redistribute and/or modify it
Expand Down Expand Up @@ -132,7 +132,7 @@ class CBTPacket : public CPacket
public:
BYTE m_nType;
BYTE m_nExtension; // Extension type if packet type is a BT_PACKET_EXTENSION
auto_ptr< CBENode > m_pNode; // Extension decoded data
unique_ptr< CBENode > m_pNode; // Extension decoded data

public:
virtual void Reset();
Expand Down
16 changes: 8 additions & 8 deletions Envy/CollectionFile.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// CollectionFile.cpp
//
// This file is part of Envy (getenvy.com) © 2016
// This file is part of Envy (getenvy.com) © 2016-2017
// Portions copyright PeerProject 2008-2014 and Shareaza 2002-2007
//
// Envy is free software. You may redistribute and/or modify it
Expand Down Expand Up @@ -191,10 +191,10 @@ BOOL CCollectionFile::LoadCollection(LPCTSTR pszFile)
if ( pZIP.GetCount() == 1 ) // xml-only
m_nType = SimpleCollection;

auto_ptr< CBuffer > pBuffer ( pFile->Decompress() );
unique_ptr< CBuffer > pBuffer ( pFile->Decompress() );
if ( ! pBuffer.get() ) return FALSE;

auto_ptr< CXMLElement > pXML ( CXMLElement::FromString( pBuffer->ReadString( pBuffer->m_nLength, CP_UTF8 ), TRUE ) );
unique_ptr< CXMLElement > pXML ( CXMLElement::FromString( pBuffer->ReadString( pBuffer->m_nLength, CP_UTF8 ), TRUE ) );
if ( ! pXML.get() ) return FALSE;
if ( ! pXML->IsNamed( L"collection" ) ) return FALSE;

Expand All @@ -209,7 +209,7 @@ BOOL CCollectionFile::LoadCollection(LPCTSTR pszFile)
CXMLElement* pElement = pContents->GetNextElement( pos );
if ( pElement->IsNamed( L"file" ) )
{
auto_ptr< File > pNewFile( new File( this ) );
unique_ptr< File > pNewFile( new File( this ) );
if ( pNewFile.get() && pNewFile->Parse( pElement ) )
m_pFiles.AddTail( pNewFile.release() );
}
Expand Down Expand Up @@ -289,7 +289,7 @@ BOOL CCollectionFile::LoadEMule(LPCTSTR pszFile)
{
for ( DWORD i = 0 ; i < nFileCount ; ++i )
{
auto_ptr< File > pCollectionFile( new File( this ) );
unique_ptr< File > pCollectionFile( new File( this ) );
if ( pCollectionFile.get() && pCollectionFile->Parse( pFile ) )
m_pFiles.AddTail( pCollectionFile.release() );
else
Expand Down Expand Up @@ -332,7 +332,7 @@ BOOL CCollectionFile::LoadDC(LPCTSTR pszFile)
if ( ! pBuffer.UnBZip() )
return FALSE; // Decompression error

auto_ptr< CXMLElement > pXML ( CXMLElement::FromString( pBuffer.ReadString( pBuffer.m_nLength, CP_UTF8 ), TRUE ) );
unique_ptr< CXMLElement > pXML ( CXMLElement::FromString( pBuffer.ReadString( pBuffer.m_nLength, CP_UTF8 ), TRUE ) );
if ( ! pXML.get() )
return FALSE; // XML decoding error

Expand Down Expand Up @@ -363,7 +363,7 @@ void CCollectionFile::LoadDC(CXMLElement* pRoot)
{
// <File Name="music.mp3" Size="100000" TTH="3A6D6T2NDRLU6BGSTSJNW3R3QWTV6A44M6AGXMA"/>

auto_ptr< File > pNewFile( new File( this ) );
unique_ptr< File > pNewFile( new File( this ) );
if ( pNewFile.get() && pNewFile->Parse( pElement ) )
m_pFiles.AddTail( pNewFile.release() );
}
Expand Down Expand Up @@ -396,7 +396,7 @@ BOOL CCollectionFile::LoadText(LPCTSTR pszFile)
if ( ! pFile.ReadString( strText ) )
break; // End of file

auto_ptr< File > pCollectionFile( new File( this ) );
unique_ptr< File > pCollectionFile( new File( this ) );
if ( ! pCollectionFile.get() )
break; // Out of memory

Expand Down
Loading

0 comments on commit bca2a67

Please sign in to comment.