diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2014-09-13 18:37:57 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2014-09-13 18:37:57 +0900 |
| commit | 9b84727324168f4d781ab5c69f627603a219eb92 (patch) | |
| tree | d9f57c1b32c72266f82b9a9e69c1a9087a03333b /src/PeerConnection.h | |
| parent | 596e5c616218c9681adf4eb45077608510e2876e (diff) | |
Use std::make_shared and make_unique where possible, part 2
Diffstat (limited to 'src/PeerConnection.h')
| -rw-r--r-- | src/PeerConnection.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/PeerConnection.h b/src/PeerConnection.h index 80849c9d..e9adb6ae 100644 --- a/src/PeerConnection.h +++ b/src/PeerConnection.h @@ -64,7 +64,7 @@ private: // The capacity of the buffer resbuf_ size_t bufferCapacity_; // The internal buffer of incoming handshakes and messages - unsigned char* resbuf_; + std::unique_ptr<unsigned char[]> resbuf_; // The number of bytes written in resbuf_ size_t resbufLength_; // The length of message (not handshake) currently receiving @@ -124,7 +124,7 @@ public: const unsigned char* getBuffer() const { - return resbuf_; + return resbuf_.get(); } size_t getBufferLength() const |
