From 74ae28b464f3bd691b7e24f6eb0ace619e290114 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 30 Sep 2013 08:29:03 +0000 Subject: Fix test fallout from SendStream ptr to auto_ptr change. You can only pass a std::auto_ptr to SendStream now. Nothing else will do for Clang. But you can cast a std::auto_ptr. --- test/basicserver/TestCommands.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'test/basicserver/TestCommands.cpp') diff --git a/test/basicserver/TestCommands.cpp b/test/basicserver/TestCommands.cpp index 5238819f..a0022f72 100644 --- a/test/basicserver/TestCommands.cpp +++ b/test/basicserver/TestCommands.cpp @@ -48,7 +48,8 @@ public: std::auto_ptr TestProtocolGetStream::DoCommand(TestProtocolReplyable &rProtocol, TestContext &rContext) const { // make a new stream object - CollectInBufferStream *pstream = mUncertainSize?(new UncertainBufferStream):(new CollectInBufferStream); + std::auto_ptr apStream( + mUncertainSize?(new UncertainBufferStream):(new CollectInBufferStream)); // Data. int values[24273]; @@ -59,14 +60,14 @@ std::auto_ptr TestProtocolGetStream::DoCommand(TestProtocol { values[x] = v++; } - pstream->Write(values, sizeof(values)); + apStream->Write(values, sizeof(values)); } // Finished - pstream->SetForReading(); + apStream->SetForReading(); // Get it to be sent - rProtocol.SendStreamAfterCommand(pstream); + rProtocol.SendStreamAfterCommand((std::auto_ptr)apStream); return std::auto_ptr(new TestProtocolGetStream(mStartingValue, mUncertainSize)); } -- cgit v1.2.3