Compilation fix 2

This commit is contained in:
Nekotekina 2014-07-01 20:04:58 +04:00
parent 2eeab1feb0
commit 5f6a236550
3 changed files with 7 additions and 3 deletions

View file

@ -125,12 +125,14 @@ public:
return m_data[(m_pos + pos) % SQSize];
}
T& PeekIfExist(T& def, u32 pos = 0)
T& PeekIfExist(u32 pos = 0)
{
static T def_value;
std::lock_guard<std::mutex> lock(m_mutex);
if (m_count <= pos)
{
return def;
return def_value;
}
else
{