Fix template functions for mingw

This commit is contained in:
Anonymous Maarten 2024-01-06 12:55:10 +01:00
parent 2410ab8944
commit 253b558a02
3 changed files with 8 additions and 8 deletions

View File

@ -76,7 +76,7 @@ class MxPtrList : public MxList<T*> {
static void Destroy(T* p_obj) { delete p_obj; };
void SetOwnership(MxBool p_ownership) { SetDestroy(p_ownership ? Destroy : MxCollection<T*>::Destroy); }
void SetOwnership(MxBool p_ownership) { MxPtrList<T>::SetDestroy(p_ownership ? MxList<T*>::Destroy : MxCollection<T*>::Destroy); }
};
template <class T>

View File

@ -13,10 +13,10 @@ class MxQueue : public MxList<T> {
MxBool Dequeue(T& p_obj)
{
MxBool hasNext = (m_first != NULL);
if (m_first) {
p_obj = m_first->GetValue();
DeleteEntry(m_first);
MxBool hasNext = (this->m_first != NULL);
if (this->m_first) {
p_obj = this->m_first->GetValue();
this->DeleteEntry(this->m_first);
}
return hasNext;

View File

@ -11,11 +11,11 @@ class MxStreamList : public list<T> {
public:
MxBool PopFront(T& p_obj)
{
if (empty())
if (this->empty())
return FALSE;
p_obj = front();
pop_front();
p_obj = this->front();
this->pop_front();
return TRUE;
}
};