Use fewer pointers refactor: eliminate some pointers in DrivenEngine
This commit is contained in:
@@ -65,8 +65,8 @@ class Channel : public eng::opnew {
|
||||
public:
|
||||
// Get the buffers associated with this channel.
|
||||
//
|
||||
StreamBuffer *out() { return sb_out_.get(); }
|
||||
StreamBuffer *in() { return sb_in_.get(); }
|
||||
StreamBuffer *out() { return &sb_out_; }
|
||||
StreamBuffer *in() { return &sb_in_; }
|
||||
|
||||
// The channel ID. These are reused.
|
||||
//
|
||||
@@ -96,7 +96,7 @@ public:
|
||||
// Channels are referenced by shared_ptr. You can
|
||||
// release your shared_ptr at any time.
|
||||
//
|
||||
Channel(DrivenEngine *de, int chid, int port, const eng::string &target, bool stop);
|
||||
Channel(int chid, int port, const eng::string &target, bool stop);
|
||||
~Channel() {};
|
||||
|
||||
private:
|
||||
@@ -110,8 +110,8 @@ private:
|
||||
int chid_;
|
||||
|
||||
// These are the in/out buffers presented to the user.
|
||||
std::shared_ptr<StreamBuffer> sb_in_;
|
||||
std::shared_ptr<StreamBuffer> sb_out_;
|
||||
StreamBuffer sb_in_;
|
||||
StreamBuffer sb_out_;
|
||||
|
||||
int port_;
|
||||
bool closed_;
|
||||
|
||||
Reference in New Issue
Block a user