Use unique_ptr in JsepCandidateCollection
Bug: None Change-Id: I80ffacf3a355879b56a03b5cb59bffa32114dac1 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/147601 Commit-Queue: Steve Anton <steveanton@webrtc.org> Reviewed-by: Seth Hampson <shampson@webrtc.org> Cr-Commit-Position: refs/heads/master@{#28712}
This commit is contained in:
@ -16,6 +16,7 @@
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@ -63,7 +64,6 @@ class JsepCandidateCollection : public IceCandidateCollection {
|
||||
// Move constructor is defined so that a vector of JsepCandidateCollections
|
||||
// can be resized.
|
||||
JsepCandidateCollection(JsepCandidateCollection&& o);
|
||||
~JsepCandidateCollection() override;
|
||||
size_t count() const override;
|
||||
bool HasCandidate(const IceCandidateInterface* candidate) const override;
|
||||
// Adds and takes ownership of the JsepIceCandidate.
|
||||
@ -77,7 +77,7 @@ class JsepCandidateCollection : public IceCandidateCollection {
|
||||
size_t remove(const cricket::Candidate& candidate);
|
||||
|
||||
private:
|
||||
std::vector<JsepIceCandidate*> candidates_;
|
||||
std::vector<std::unique_ptr<JsepIceCandidate>> candidates_;
|
||||
|
||||
RTC_DISALLOW_COPY_AND_ASSIGN(JsepCandidateCollection);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user