mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-25 06:45:27 +02:00
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>
|
template <typename C>
|
||||||
class CThreadSafeQueue : protected std::list<C>
|
class CThreadSafeQueue : protected std::list<C>
|
||||||
{
|
{
|
||||||
|
protected:
|
||||||
|
using Base = std::list<C>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CThreadSafeQueue()
|
CThreadSafeQueue()
|
||||||
{
|
{
|
||||||
@ -51,7 +54,7 @@ public:
|
|||||||
{
|
{
|
||||||
{
|
{
|
||||||
CComCritSecLock<CComAutoCriticalSection> lock(m_Crit, true);
|
CComCritSecLock<CComAutoCriticalSection> lock(m_Crit, true);
|
||||||
push_back(c);
|
Base::push_back(c);
|
||||||
}
|
}
|
||||||
::SetEvent(m_hEvent);
|
::SetEvent(m_hEvent);
|
||||||
}
|
}
|
||||||
@ -59,13 +62,13 @@ public:
|
|||||||
bool pop(C& c)
|
bool pop(C& c)
|
||||||
{
|
{
|
||||||
CComCritSecLock<CComAutoCriticalSection> lock( m_Crit, true );
|
CComCritSecLock<CComAutoCriticalSection> lock( m_Crit, true );
|
||||||
if (empty())
|
if (Base::empty())
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
c = front();
|
c = Base::front();
|
||||||
pop_front();
|
Base::pop_front();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user