Skip to content

Commit

Permalink
Update ndWeakPtr.h
Browse files Browse the repository at this point in the history
more complier errors fixed for linux
  • Loading branch information
JulioJerez committed Jan 5, 2025
1 parent 8af1106 commit 5b8c154
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions newton-4.00/sdk/dCore/ndWeakPtr.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,26 +39,26 @@ ndWeakPtr<T>::ndWeakPtr(const ndWeakPtr<T>& other)
:ndSharedPtr<T>(other)
{
ndAssert(0);
ndAssert(m_references);
m_references->m_weakRef.fetch_add(1);
ndAssert(ndSharedPtr<T>::m_references);
ndSharedPtr<T>::m_references->m_weakRef.fetch_add(1);
}

template <typename T>
ndWeakPtr<T>::ndWeakPtr(const ndSharedPtr<T>& ptr)
:ndSharedPtr<T>(ptr)
{
ndAssert(0);
ndAssert(m_references);
ndAssert(ndSharedPtr<T>::m_references);
}

template <typename T>
ndWeakPtr<T>::~ndWeakPtr()
{
ndAssert(0);
m_references->m_weakRef.fetch_add(-1);
ndAssert(ndSharedPtr<T>::m_references);
ndSharedPtr<T>::m_references->m_weakRef.fetch_add(-1);
}


template <typename T>
ndWeakPtr<T>& ndWeakPtr<T>::operator=(const ndWeakPtr<T>& other)
{
Expand Down

0 comments on commit 5b8c154

Please sign in to comment.