Index: src/libchcore/TOrderedBufferQueue.cpp =================================================================== diff -u -rb6a48931b8155a01d871d050f52d915abb2df8ca -rda7737de7046ba0ecd255240fb36b4a46584ebf2 --- src/libchcore/TOrderedBufferQueue.cpp (.../TOrderedBufferQueue.cpp) (revision b6a48931b8155a01d871d050f52d915abb2df8ca) +++ src/libchcore/TOrderedBufferQueue.cpp (.../TOrderedBufferQueue.cpp) (revision da7737de7046ba0ecd255240fb36b4a46584ebf2) @@ -23,11 +23,6 @@ namespace chcore { - TOrderedBufferQueue::TOrderedBufferQueue() : - m_eventHasBuffers(true, false) - { - } - TOrderedBufferQueue::TOrderedBufferQueue(unsigned long long ullExpectedPosition) : m_eventHasBuffers(true, false), m_ullExpectedBufferPosition(ullExpectedPosition) @@ -71,29 +66,6 @@ return (!m_setBuffers.empty() && (m_ullExpectedBufferPosition == NoPosition || (*m_setBuffers.begin())->GetFilePosition() == m_ullExpectedBufferPosition)); } - void TOrderedBufferQueue::Clear() - { - m_setBuffers.clear(); - m_ullExpectedBufferPosition = NoPosition; - m_eventHasBuffers.ResetEvent(); - } - - std::vector TOrderedBufferQueue::GetUnneededLastParts() - { - auto iterFind = std::find_if(m_setBuffers.begin(), m_setBuffers.end(), [](TOverlappedDataBuffer* pBuffer) { return pBuffer->IsLastPart(); }); - if(iterFind == m_setBuffers.end() || ++iterFind == m_setBuffers.end()) - return std::vector(); - - auto iterInvalidParts = std::find_if(iterFind, m_setBuffers.end(), [](TOverlappedDataBuffer* pBuffer) { return !pBuffer->IsLastPart(); }); - if(iterInvalidParts != m_setBuffers.end()) - throw TCoreException(eErr_InvalidArgument, L"Found non-last-parts after last-part", LOCATION); - - std::vector vBuffers(iterFind, m_setBuffers.end()); - m_setBuffers.erase(iterFind, m_setBuffers.end()); - - return vBuffers; - } - size_t TOrderedBufferQueue::GetCount() const { return m_setBuffers.size(); Index: src/libchcore/TOrderedBufferQueue.h =================================================================== diff -u -r71bc7ffbd5b707e2cbb78eb30677d82577d62ee1 -rda7737de7046ba0ecd255240fb36b4a46584ebf2 --- src/libchcore/TOrderedBufferQueue.h (.../TOrderedBufferQueue.h) (revision 71bc7ffbd5b707e2cbb78eb30677d82577d62ee1) +++ src/libchcore/TOrderedBufferQueue.h (.../TOrderedBufferQueue.h) (revision da7737de7046ba0ecd255240fb36b4a46584ebf2) @@ -32,16 +32,12 @@ static const unsigned long long NoPosition = 0xffffffffffffffff; public: - TOrderedBufferQueue(); TOrderedBufferQueue(unsigned long long ullExpectedPosition); void Push(TOverlappedDataBuffer* pBuffer); TOverlappedDataBuffer* Pop(); const TOverlappedDataBuffer* const Peek() const; - void Clear(); - std::vector GetUnneededLastParts(); - size_t GetCount() const; bool IsEmpty() const; Index: src/libchcore/TReadBufferQueueWrapper.cpp =================================================================== diff -u -rb6a48931b8155a01d871d050f52d915abb2df8ca -rda7737de7046ba0ecd255240fb36b4a46584ebf2 --- src/libchcore/TReadBufferQueueWrapper.cpp (.../TReadBufferQueueWrapper.cpp) (revision b6a48931b8155a01d871d050f52d915abb2df8ca) +++ src/libchcore/TReadBufferQueueWrapper.cpp (.../TReadBufferQueueWrapper.cpp) (revision da7737de7046ba0ecd255240fb36b4a46584ebf2) @@ -97,14 +97,14 @@ bool TReadBufferQueueWrapper::IsBufferReady() const { if(IsDataSourceFinished()) - return !m_tClaimedQueue.IsEmpty(); + return !m_tClaimedQueue.empty(); else - return !m_tClaimedQueue.IsEmpty() || !m_spUnorderedQueue->IsEmpty(); + return !m_tClaimedQueue.empty() || !m_spUnorderedQueue->IsEmpty(); } size_t TReadBufferQueueWrapper::GetCount() const { - return m_tClaimedQueue.GetCount(); + return m_tClaimedQueue.size(); } void TReadBufferQueueWrapper::SetDataSourceFinished(TOverlappedDataBuffer* pBuffer) @@ -116,12 +116,24 @@ { m_ullDataSourceFinishedPos = pBuffer->GetFilePosition(); - std::vector vItems = m_tClaimedQueue.GetUnneededLastParts(); - for(TOverlappedDataBuffer* pBuffer : vItems) + // release superfluous finished buffers + auto iterFind = std::find_if(m_tClaimedQueue.begin(), m_tClaimedQueue.end(), [](TOverlappedDataBuffer* pBuffer) { return pBuffer->IsLastPart(); }); + if(iterFind == m_tClaimedQueue.end() || ++iterFind == m_tClaimedQueue.end()) { - m_spUnorderedQueue->Push(pBuffer); + UpdateHasBuffers(); + return; } + auto iterInvalidParts = std::find_if(iterFind, m_tClaimedQueue.end(), [](TOverlappedDataBuffer* pBuffer) { return !pBuffer->IsLastPart(); }); + if(iterInvalidParts != m_tClaimedQueue.end()) + throw TCoreException(eErr_InvalidArgument, L"Found non-last-parts after last-part", LOCATION); + + for(auto iter = iterFind; iter != m_tClaimedQueue.end(); ++iter) + { + m_spUnorderedQueue->Push(*iter); + } + m_tClaimedQueue.erase(iterFind, m_tClaimedQueue.end()); + UpdateHasBuffers(); } } Index: src/libchcore/TReadBufferQueueWrapper.h =================================================================== diff -u -rb6a48931b8155a01d871d050f52d915abb2df8ca -rda7737de7046ba0ecd255240fb36b4a46584ebf2 --- src/libchcore/TReadBufferQueueWrapper.h (.../TReadBufferQueueWrapper.h) (revision b6a48931b8155a01d871d050f52d915abb2df8ca) +++ src/libchcore/TReadBufferQueueWrapper.h (.../TReadBufferQueueWrapper.h) (revision da7737de7046ba0ecd255240fb36b4a46584ebf2) @@ -21,7 +21,7 @@ #include "TEvent.h" #include "TBufferList.h" -#include "TOrderedBufferQueue.h" +#include "TSimpleOrderedBufferQueue.h" namespace chcore { @@ -52,7 +52,7 @@ private: TBufferListPtr m_spUnorderedQueue; // external queue of buffers to use - TOrderedBufferQueue m_tClaimedQueue; // internal queue of claimed buffers + TSimpleOrderedBufferQueue m_tClaimedQueue; // internal queue of claimed buffers TEvent m_eventHasBuffers; Index: src/libchcore/TSimpleOrderedBufferQueue.h =================================================================== diff -u --- src/libchcore/TSimpleOrderedBufferQueue.h (revision 0) +++ src/libchcore/TSimpleOrderedBufferQueue.h (revision da7737de7046ba0ecd255240fb36b4a46584ebf2) @@ -0,0 +1,68 @@ +// ============================================================================ +// Copyright (C) 2001-2016 by Jozef Starosczyk +// ixen@copyhandler.com +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License +// (version 2) as published by the Free Software Foundation; +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// ============================================================================ +#ifndef __TSIMPLEORDEREDBUFFERQUEUE_H__ +#define __TSIMPLEORDEREDBUFFERQUEUE_H__ + +#include +#include "TCoreException.h" +#include "TOverlappedDataBuffer.h"........................ + +...... +#include "TBufferList.......................................h" +namespace chcore +{ + class TSimpleOrderedBufferQueue : public std::set + { + public: + void Push(TOverlappedDataBuffer* pBuffer) + { + if(!pBuffer) + throw TCoreException(eErr_InvalidArgument, L"pBuffer is NULL", LOCATION); + insert(pBuffer); + } + + TOverlappedDataBuffer* Pop() + { + if(empty()) + return nullptr; + TOverlappedDataBuffer* pBuffer = *begin(); + erase(begin()); + + return pBuffer; + } + + const TOverlappedDataBuffer* const Peek() const + { + if(empty()) + return nullptr; + return *begin(); + } + + void ReleaseBuffers(const TBufferListPtr& spBuffers) + { + for (TOverlappedDataBuffer* pBuffer : *this) + { + spBuffers->Push(pBuffer); + } + clear(); + } + }; +} + +#endif Index: src/libchcore/TWriteBufferQueueWrapper.cpp =================================================================== diff -u -rb6a48931b8155a01d871d050f52d915abb2df8ca -rda7737de7046ba0ecd255240fb36b4a46584ebf2 --- src/libchcore/TWriteBufferQueueWrapper.cpp (.../TWriteBufferQueueWrapper.cpp) (revision b6a48931b8155a01d871d050f52d915abb2df8ca) +++ src/libchcore/TWriteBufferQueueWrapper.cpp (.../TWriteBufferQueueWrapper.cpp) (revision da7737de7046ba0ecd255240fb36b4a46584ebf2) @@ -72,16 +72,9 @@ bool TWriteBufferQueueWrapper::IsBufferReady() const { - return !m_tClaimedQueue.IsEmpty() || !m_spDataQueue->IsEmpty(); + return !m_tClaimedQueue.empty() || !m_spDataQueue->IsEmpty(); } - void TWriteBufferQueueWrapper::Clear() - { - m_spDataQueue->Clear(); - m_tClaimedQueue.Clear(); - m_eventHasBuffers.ResetEvent(); - } - size_t TWriteBufferQueueWrapper::GetCount() const { return m_spDataQueue->GetCount(); Index: src/libchcore/TWriteBufferQueueWrapper.h =================================================================== diff -u -rb6a48931b8155a01d871d050f52d915abb2df8ca -rda7737de7046ba0ecd255240fb36b4a46584ebf2 --- src/libchcore/TWriteBufferQueueWrapper.h (.../TWriteBufferQueueWrapper.h) (revision b6a48931b8155a01d871d050f52d915abb2df8ca) +++ src/libchcore/TWriteBufferQueueWrapper.h (.../TWriteBufferQueueWrapper.h) (revision da7737de7046ba0ecd255240fb36b4a46584ebf2) @@ -22,6 +22,7 @@ #include "TEvent.h" #include "TOrderedBufferQueue.h" #include "TBufferList.h" +#include "TSimpleOrderedBufferQueue.h" namespace chcore { @@ -30,17 +31,12 @@ class TWriteBufferQueueWrapper { public: - static const unsigned long long NoPosition = 0xffffffffffffffff; - - public: TWriteBufferQueueWrapper(const TOrderedBufferQueuePtr& spQueue); void Push(TOverlappedDataBuffer* pBuffer, bool /*bKeepPosition*/) { Push(pBuffer); } void Push(TOverlappedDataBuffer* pBuffer); TOverlappedDataBuffer* Pop(); - void Clear(); - size_t GetCount() const; bool IsEmpty() const; @@ -54,7 +50,7 @@ private: TOrderedBufferQueuePtr m_spDataQueue; // external queue of buffers to use - TOrderedBufferQueue m_tClaimedQueue; // internal queue of claimed buffers + TSimpleOrderedBufferQueue m_tClaimedQueue; // internal queue of claimed buffers TEvent m_eventHasBuffers; }; Index: src/libchcore/Tests/TOrderedBufferQueueTests.cpp =================================================================== diff -u -rb6a48931b8155a01d871d050f52d915abb2df8ca -rda7737de7046ba0ecd255240fb36b4a46584ebf2 --- src/libchcore/Tests/TOrderedBufferQueueTests.cpp (.../TOrderedBufferQueueTests.cpp) (revision b6a48931b8155a01d871d050f52d915abb2df8ca) +++ src/libchcore/Tests/TOrderedBufferQueueTests.cpp (.../TOrderedBufferQueueTests.cpp) (revision da7737de7046ba0ecd255240fb36b4a46584ebf2) @@ -7,70 +7,6 @@ using namespace chcore; -// no expected position mode -TEST(TOrderedBufferQueueTests, NoExpectedPos_ConstructionSanityTest) -{ - TOrderedBufferQueue queue; - - EXPECT_EQ(0, queue.GetCount()); - EXPECT_EQ(true, queue.IsEmpty()); - EXPECT_TIMEOUT(queue.GetHasBuffersEvent()); - EXPECT_EQ(nullptr, queue.Peek()); -} - -TEST(TOrderedBufferQueueTests, NoExpectedPos_Push) -{ - TOrderedBufferQueue queue; - TOverlappedDataBuffer buffer(1024, nullptr); - - queue.Push(&buffer); - - EXPECT_EQ(1, queue.GetCount()); - EXPECT_EQ(false, queue.IsEmpty()); - EXPECT_SIGNALED(queue.GetHasBuffersEvent()); - EXPECT_EQ(&buffer, queue.Peek()); -} - -TEST(TOrderedBufferQueueTests, NoExpectedPos_Pop) -{ - TOrderedBufferQueue queue; - TOverlappedDataBuffer buffer(1024, nullptr); - - queue.Push(&buffer); - EXPECT_EQ(&buffer, queue.Pop()); - - EXPECT_EQ(0, queue.GetCount()); - EXPECT_EQ(true, queue.IsEmpty()); - EXPECT_TIMEOUT(queue.GetHasBuffersEvent()); - EXPECT_EQ(nullptr, queue.Peek()); -} - -TEST(TOrderedBufferQueueTests, NoExpectedPos_Clear) -{ - TOrderedBufferQueue queue; - TOverlappedDataBuffer buffer(1024, nullptr); - - queue.Push(&buffer); - queue.Clear(); - - EXPECT_EQ(0, queue.GetCount()); - EXPECT_EQ(true, queue.IsEmpty()); - EXPECT_TIMEOUT(queue.GetHasBuffersEvent()); - EXPECT_EQ(nullptr, queue.Peek()); -} - -TEST(TOrderedBufferQueueTests, NoExpectedPos_ReleaseBuffers) -{ - TOrderedBufferQueue queue; - TBufferListPtr spReleaseList(std::make_shared()); - TOverlappedDataBuffer buffer(1024, nullptr); - - queue.Push(&buffer); - queue.ReleaseBuffers(spReleaseList); - - EXPECT_EQ(1, spReleaseList->GetCount()); -} - /////////////////////////////////////////////////////////////////////////////////////////// // expected position mode TEST(TOrderedBufferQueueTests, ExpectedPos_ConstructionSanityTest) @@ -147,36 +83,6 @@ EXPECT_EQ(nullptr, queue.Peek()); } -TEST(TOrderedBufferQueueTests, ExpectedPos_Clear) -{ - TOrderedBufferQueue queue(0); - TOverlappedDataBuffer buffer(1024, nullptr); - - queue.Push(&buffer); - queue.Clear(); - - EXPECT_EQ(0, queue.GetCount()); - EXPECT_EQ(true, queue.IsEmpty()); - EXPECT_TIMEOUT(queue.GetHasBuffersEvent()); - EXPECT_EQ(nullptr, queue.Peek()); -} - -TEST(TOrderedBufferQueueTests, ExpectedPos_ClearUnordered) -{ - TOrderedBufferQueue queue(0); - TOverlappedDataBuffer buffer1(1024, nullptr); - buffer1.SetFilePosition(1000); - buffer1.SetRequestedDataSize(1000); - - queue.Push(&buffer1); - - queue.Clear(); - - EXPECT_EQ(0, queue.GetCount()); - EXPECT_EQ(true, queue.IsEmpty()); - EXPECT_TIMEOUT(queue.GetHasBuffersEvent()); -} - TEST(TOrderedBufferQueueTests, ExpectedPos_ReleaseBuffers) { TOrderedBufferQueue queue(0); @@ -201,81 +107,3 @@ EXPECT_EQ(1, spReleaseList->GetCount()); } - -///////////////////////////////////////////////////////////////////////// -// custom, specialized functionality - -TEST(TOrderedBufferQueueTests, GetUnneededLastParts_NoLastParts) -{ - TOrderedBufferQueue queue(0); - TOverlappedDataBuffer buffer1(1024, nullptr); - buffer1.SetFilePosition(1000); - buffer1.SetRequestedDataSize(1000); - TOverlappedDataBuffer buffer2(1024, nullptr); - buffer2.SetFilePosition(0); - buffer2.SetRequestedDataSize(1000); - - queue.Push(&buffer1); - queue.Push(&buffer2); - - auto vParts = queue.GetUnneededLastParts(); - - EXPECT_EQ(0, vParts.size()); -} - -TEST(TOrderedBufferQueueTests, GetUnneededLastParts_SingleLastPart) -{ - TOrderedBufferQueue queue(0); - TOverlappedDataBuffer buffer1(1024, nullptr); - buffer1.SetFilePosition(1000); - buffer1.SetRequestedDataSize(1000); - buffer1.SetLastPart(true); - TOverlappedDataBuffer buffer2(1024, nullptr); - buffer2.SetFilePosition(0); - buffer2.SetRequestedDataSize(1000); - - queue.Push(&buffer1); - queue.Push(&buffer2); - - auto vParts = queue.GetUnneededLastParts(); - - EXPECT_EQ(0, vParts.size()); -} - -TEST(TOrderedBufferQueueTests, GetUnneededLastParts_UnfinishedBufferAfterFinished) -{ - TOrderedBufferQueue queue(0); - TOverlappedDataBuffer buffer1(1024, nullptr); - buffer1.SetFilePosition(1000); - buffer1.SetRequestedDataSize(1000); - TOverlappedDataBuffer buffer2(1024, nullptr); - buffer2.SetFilePosition(0); - buffer2.SetRequestedDataSize(1000); - buffer2.SetLastPart(true); - - queue.Push(&buffer1); - queue.Push(&buffer2); - - EXPECT_THROW(queue.GetUnneededLastParts(), TCoreException); -} - -TEST(TOrderedBufferQueueTests, GetUnneededLastParts_TwoLastParts) -{ - TOrderedBufferQueue queue(0); - TOverlappedDataBuffer buffer1(1024, nullptr); - buffer1.SetFilePosition(1000); - buffer1.SetRequestedDataSize(1000); - buffer1.SetLastPart(true); - TOverlappedDataBuffer buffer2(1024, nullptr); - buffer2.SetFilePosition(0); - buffer2.SetRequestedDataSize(1000); - buffer2.SetLastPart(true); - - queue.Push(&buffer1); - queue.Push(&buffer2); - - auto vParts = queue.GetUnneededLastParts(); - - EXPECT_EQ(1, vParts.size()); - EXPECT_EQ(&buffer1, vParts[0]); -} Index: src/libchcore/Tests/TOverlappedWriterTests.cpp =================================================================== diff -u -r3ccbdb8d3eac3427e6d3354854476e57fdc7ceb9 -rda7737de7046ba0ecd255240fb36b4a46584ebf2 --- src/libchcore/Tests/TOverlappedWriterTests.cpp (.../TOverlappedWriterTests.cpp) (revision 3ccbdb8d3eac3427e6d3354854476e57fdc7ceb9) +++ src/libchcore/Tests/TOverlappedWriterTests.cpp (.../TOverlappedWriterTests.cpp) (revision da7737de7046ba0ecd255240fb36b4a46584ebf2) @@ -8,7 +8,7 @@ TEST(TOverlappedWriterTests, DefaultTest) { logger::TLogFileDataPtr spLogData(std::make_shared()); - TOrderedBufferQueuePtr spQueue(std::make_shared()); + TOrderedBufferQueuePtr spQueue(std::make_shared(0)); TOverlappedWriter writer(spLogData, spQueue, 0); } Index: src/libchcore/Tests/TSimpleOrderedBufferQueueTests.cpp =================================================================== diff -u --- src/libchcore/Tests/TSimpleOrderedBufferQueueTests.cpp (revision 0) +++ src/libchcore/Tests/TSimpleOrderedBufferQueueTests.cpp (revision da7737de7046ba0ecd255240fb36b4a46584ebf2) @@ -0,0 +1,67 @@ +#include "stdafx.h" +#include "gtest/gtest.h" +#include "gmock/gmock.h" +#include "../TSimpleOrderedBufferQueue.h" +#include "../TBufferList.h" + +using namespace chcore; + +// no expected position mode +TEST(TSimpleOrderedBufferQueueTests, NoExpectedPos_ConstructionSanityTest) +{ + TSimpleOrderedBufferQueue queue; + + EXPECT_EQ(0, queue.size()); + EXPECT_EQ(true, queue.empty()); + EXPECT_EQ(nullptr, queue.Peek()); +} + +TEST(TSimpleOrderedBufferQueueTests, NoExpectedPos_Push) +{ + TSimpleOrderedBufferQueue queue; + TOverlappedDataBuffer buffer(1024, nullptr); + + queue.Push(&buffer); + + EXPECT_EQ(1, queue.size()); + EXPECT_EQ(false, queue.empty()); + EXPECT_EQ(&buffer, queue.Peek()); +} + +TEST(TSimpleOrderedBufferQueueTests, NoExpectedPos_Pop) +{ + TSimpleOrderedBufferQueue queue; + TOverlappedDataBuffer buffer(1024, nullptr); + + queue.Push(&buffer); + EXPECT_EQ(&buffer, queue.Pop()); + + EXPECT_EQ(0, queue.size()); + EXPECT_EQ(true, queue.empty()); + EXPECT_EQ(nullptr, queue.Peek()); +} + +TEST(TSimpleOrderedBufferQueueTests, NoExpectedPos_Clear) +{ + TSimpleOrderedBufferQueue queue; + TOverlappedDataBuffer buffer(1024, nullptr); + + queue.Push(&buffer); + queue.clear(); + + EXPECT_EQ(0, queue.size()); + EXPECT_EQ(true, queue.empty()); + EXPECT_EQ(nullptr, queue.Peek()); +} + +TEST(TSimpleOrderedBufferQueueTests, NoExpectedPos_ReleaseBuffers) +{ + TSimpleOrderedBufferQueue queue; + TBufferListPtr spReleaseList(std::make_shared()); + TOverlappedDataBuffer buffer(1024, nullptr); + + queue.Push(&buffer); + queue.ReleaseBuffers(spReleaseList); + + EXPECT_EQ(1, spReleaseList->GetCount()); +} Index: src/libchcore/Tests/TWriteBufferQueueWrapperTests.cpp =================================================================== diff -u -rb6a48931b8155a01d871d050f52d915abb2df8ca -rda7737de7046ba0ecd255240fb36b4a46584ebf2 --- src/libchcore/Tests/TWriteBufferQueueWrapperTests.cpp (.../TWriteBufferQueueWrapperTests.cpp) (revision b6a48931b8155a01d871d050f52d915abb2df8ca) +++ src/libchcore/Tests/TWriteBufferQueueWrapperTests.cpp (.../TWriteBufferQueueWrapperTests.cpp) (revision da7737de7046ba0ecd255240fb36b4a46584ebf2) @@ -15,7 +15,7 @@ TEST(TWriteBufferQueueWrapperTests, Constructor) { - TOrderedBufferQueuePtr spQueue(std::make_shared()); + TOrderedBufferQueuePtr spQueue(std::make_shared(0)); TWriteBufferQueueWrapper queue(spQueue); EXPECT_EQ(0, queue.GetCount()); @@ -25,15 +25,15 @@ TEST(TWriteBufferQueueWrapperTests, Pop_EmptyQueue) { - TOrderedBufferQueuePtr spQueue(std::make_shared()); + TOrderedBufferQueuePtr spQueue(std::make_shared(0)); TWriteBufferQueueWrapper queue(spQueue); EXPECT_EQ(nullptr, queue.Pop()); } TEST(TWriteBufferQueueWrapperTests, Pop_FromBufferList) { - TOrderedBufferQueuePtr spQueue(std::make_shared()); + TOrderedBufferQueuePtr spQueue(std::make_shared(0)); TOverlappedDataBuffer buffer1(1024, nullptr); buffer1.SetFilePosition(0); buffer1.SetRequestedDataSize(1000); @@ -75,7 +75,7 @@ TEST(TWriteBufferQueueWrapperTests, PushPop_ClaimedBuffers) { - TOrderedBufferQueuePtr spQueue(std::make_shared()); + TOrderedBufferQueuePtr spQueue(std::make_shared(0)); TWriteBufferQueueWrapper queue(spQueue); TOverlappedDataBuffer buffer1(1024, nullptr); @@ -122,7 +122,7 @@ TEST(TWriteBufferQueueWrapperTests, PushPop_MixedBuffers) { - TOrderedBufferQueuePtr spQueue(std::make_shared()); + TOrderedBufferQueuePtr spQueue(std::make_shared(0)); TOverlappedDataBuffer buffer1(1024, nullptr); buffer1.SetFilePosition(0); buffer1.SetRequestedDataSize(1000); Index: src/libchcore/libchcore.vc140.vcxproj =================================================================== diff -u -rbef894e38e5c1486824787cf8c47a87a0828b228 -rda7737de7046ba0ecd255240fb36b4a46584ebf2 --- src/libchcore/libchcore.vc140.vcxproj (.../libchcore.vc140.vcxproj) (revision bef894e38e5c1486824787cf8c47a87a0828b228) +++ src/libchcore/libchcore.vc140.vcxproj (.../libchcore.vc140.vcxproj) (revision da7737de7046ba0ecd255240fb36b4a46584ebf2) @@ -792,6 +792,12 @@ true true + + true + true + true + true + true true Index: src/libchcore/libchcore.vc140.vcxproj.filters =================================================================== diff -u -rbef894e38e5c1486824787cf8c47a87a0828b228 -rda7737de7046ba0ecd255240fb36b4a46584ebf2 --- src/libchcore/libchcore.vc140.vcxproj.filters (.../libchcore.vc140.vcxproj.filters) (revision bef894e38e5c1486824787cf8c47a87a0828b228) +++ src/libchcore/libchcore.vc140.vcxproj.filters (.../libchcore.vc140.vcxproj.filters) (revision da7737de7046ba0ecd255240fb36b4a46584ebf2) @@ -931,5 +931,8 @@ Tests\DataBuffer + + Tests\DataBuffer + \ No newline at end of file