Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1023)

Unified Diff: webrtc/p2p/base/stun.h

Issue 2735523002: Make StunMessage::attrs_ a vector of unique_ptrs instead of a pointer to a vector of pointers. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/p2p/base/stun.cc » ('j') | webrtc/p2p/base/stun.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/stun.h
diff --git a/webrtc/p2p/base/stun.h b/webrtc/p2p/base/stun.h
index 028787c72aa9fd80c985bf156182803b221edcce..3e1c5268ef12c1655f5fe59070555faf5ff3951c 100644
--- a/webrtc/p2p/base/stun.h
+++ b/webrtc/p2p/base/stun.h
@@ -132,7 +132,7 @@ class StunUInt16ListAttribute;
class StunMessage {
public:
StunMessage();
- virtual ~StunMessage();
+ virtual ~StunMessage() = default;
int type() const { return type_; }
size_t length() const { return length_; }
@@ -199,7 +199,7 @@ class StunMessage {
uint16_t type_;
uint16_t length_;
std::string transaction_id_;
- std::vector<StunAttribute*>* attrs_;
+ std::vector<std::unique_ptr<StunAttribute>> attrs_;
};
// Base class for all STUN/TURN attributes.
« no previous file with comments | « no previous file | webrtc/p2p/base/stun.cc » ('j') | webrtc/p2p/base/stun.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698