diff options
author | Chris Wilson <chris+github@qwirx.com> | 2013-09-30 08:29:03 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2013-09-30 08:29:03 +0000 |
commit | 74ae28b464f3bd691b7e24f6eb0ace619e290114 (patch) | |
tree | 1a1f2f27c8b90d213ebf5abde9007b2f914e5307 /test/basicserver/TestCommands.cpp | |
parent | dae6303135c66acdd0e4f3985c6e5c95334aea7f (diff) |
Fix test fallout from SendStream ptr to auto_ptr change.
You can only pass a std::auto_ptr<IOStream> to SendStream now. Nothing
else will do for Clang. But you can cast a std::auto_ptr<subclass>.
Diffstat (limited to 'test/basicserver/TestCommands.cpp')
-rw-r--r-- | test/basicserver/TestCommands.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
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<TestProtocolMessage> TestProtocolGetStream::DoCommand(TestProtocolReplyable &rProtocol, TestContext &rContext) const { // make a new stream object - CollectInBufferStream *pstream = mUncertainSize?(new UncertainBufferStream):(new CollectInBufferStream); + std::auto_ptr<CollectInBufferStream> apStream( + mUncertainSize?(new UncertainBufferStream):(new CollectInBufferStream)); // Data. int values[24273]; @@ -59,14 +60,14 @@ std::auto_ptr<TestProtocolMessage> 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<IOStream>)apStream); return std::auto_ptr<TestProtocolMessage>(new TestProtocolGetStream(mStartingValue, mUncertainSize)); } |