Code enhancement: add base class template qualifier
Fixed build failure with "/permissive-" option caused by use of members of dependent base class template without qualifier.
This commit is contained in:
parent
66fc977304
commit
d38559b339
@ -31,6 +31,9 @@
|
||||
template <typename C>
|
||||
class CThreadSafeQueue : protected std::list<C>
|
||||
{
|
||||
protected:
|
||||
using Base = std::list<C>;
|
||||
|
||||
public:
|
||||
CThreadSafeQueue()
|
||||
{
|
||||
@ -51,7 +54,7 @@ public:
|
||||
{
|
||||
{
|
||||
CComCritSecLock<CComAutoCriticalSection> lock(m_Crit, true);
|
||||
push_back(c);
|
||||
Base::push_back(c);
|
||||
}
|
||||
::SetEvent(m_hEvent);
|
||||
}
|
||||
@ -59,13 +62,13 @@ public:
|
||||
bool pop(C& c)
|
||||
{
|
||||
CComCritSecLock<CComAutoCriticalSection> lock( m_Crit, true );
|
||||
if (empty())
|
||||
if (Base::empty())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
c = front();
|
||||
pop_front();
|
||||
c = Base::front();
|
||||
Base::pop_front();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user