Finish clearing out std::vector from PortabilityLayer

This commit is contained in:
elasota
2021-05-11 21:27:40 -04:00
parent 95260f8d8a
commit 32ff2f6fe8
22 changed files with 280 additions and 296 deletions

View File

@@ -1,8 +1,5 @@
#pragma once
#ifndef __PL_SCOPEDPTR_H__
#define __PL_SCOPEDPTR_H__
#include "CoreDefs.h"
namespace PortabilityLayer
@@ -49,7 +46,7 @@ namespace PortabilityLayer
inline ScopedPtr<T>::~ScopedPtr()
{
if (m_ref)
delete m_ref;
m_ref->Destroy();
}
template<class T>
@@ -87,11 +84,9 @@ namespace PortabilityLayer
template<class T>
inline void ScopedPtr<T>::Set(T *ref)
{
if (m_ref && m_ref != ref)
delete m_ref;
if (m_ref && m_ref != ref)
m_ref->Destroy();
m_ref = ref;
}
}
#endif