| Index: webrtc/p2p/base/stun.cc
|
| diff --git a/webrtc/p2p/base/stun.cc b/webrtc/p2p/base/stun.cc
|
| index b66ac0308a326418b580a5c0e92a3fddf7d2cec6..2c9e557fbb06c6362b7a6cb671a4b6d9fa60196e 100644
|
| --- a/webrtc/p2p/base/stun.cc
|
| +++ b/webrtc/p2p/base/stun.cc
|
| @@ -406,7 +406,7 @@ const StunAttribute* StunMessage::GetAttribute(int type) const {
|
| if ((*attrs_)[i]->type() == type)
|
| return (*attrs_)[i];
|
| }
|
| - return NULL;
|
| + return nullptr;
|
| }
|
|
|
| bool StunMessage::IsValidTransactionId(const std::string& transaction_id) {
|
| @@ -455,7 +455,7 @@ StunAttribute* StunAttribute::Create(StunAttributeValueType value_type,
|
| case STUN_VALUE_UINT16_LIST:
|
| return new StunUInt16ListAttribute(type, length);
|
| default:
|
| - return NULL;
|
| + return nullptr;
|
| }
|
| }
|
|
|
| @@ -464,7 +464,7 @@ StunAddressAttribute* StunAttribute::CreateAddress(uint16_t type) {
|
| }
|
|
|
| StunXorAddressAttribute* StunAttribute::CreateXorAddress(uint16_t type) {
|
| - return new StunXorAddressAttribute(type, 0, NULL);
|
| + return new StunXorAddressAttribute(type, 0, nullptr);
|
| }
|
|
|
| StunUInt64Attribute* StunAttribute::CreateUInt64(uint16_t type) {
|
| @@ -562,8 +562,7 @@ bool StunAddressAttribute::Write(ByteBufferWriter* buf) const {
|
|
|
| StunXorAddressAttribute::StunXorAddressAttribute(uint16_t type,
|
| const rtc::SocketAddress& addr)
|
| - : StunAddressAttribute(type, addr), owner_(NULL) {
|
| -}
|
| + : StunAddressAttribute(type, addr), owner_(nullptr) {}
|
|
|
| StunXorAddressAttribute::StunXorAddressAttribute(uint16_t type,
|
| uint16_t length,
|
| @@ -694,25 +693,23 @@ bool StunUInt64Attribute::Write(ByteBufferWriter* buf) const {
|
| }
|
|
|
| StunByteStringAttribute::StunByteStringAttribute(uint16_t type)
|
| - : StunAttribute(type, 0), bytes_(NULL) {
|
| -}
|
| + : StunAttribute(type, 0), bytes_(nullptr) {}
|
|
|
| StunByteStringAttribute::StunByteStringAttribute(uint16_t type,
|
| const std::string& str)
|
| - : StunAttribute(type, 0), bytes_(NULL) {
|
| + : StunAttribute(type, 0), bytes_(nullptr) {
|
| CopyBytes(str.c_str(), str.size());
|
| }
|
|
|
| StunByteStringAttribute::StunByteStringAttribute(uint16_t type,
|
| const void* bytes,
|
| size_t length)
|
| - : StunAttribute(type, 0), bytes_(NULL) {
|
| + : StunAttribute(type, 0), bytes_(nullptr) {
|
| CopyBytes(bytes, length);
|
| }
|
|
|
| StunByteStringAttribute::StunByteStringAttribute(uint16_t type, uint16_t length)
|
| - : StunAttribute(type, length), bytes_(NULL) {
|
| -}
|
| + : StunAttribute(type, length), bytes_(nullptr) {}
|
|
|
| StunByteStringAttribute::~StunByteStringAttribute() {
|
| delete [] bytes_;
|
| @@ -729,13 +726,13 @@ void StunByteStringAttribute::CopyBytes(const void* bytes, size_t length) {
|
| }
|
|
|
| uint8_t StunByteStringAttribute::GetByte(size_t index) const {
|
| - RTC_DCHECK(bytes_ != NULL);
|
| + RTC_DCHECK(bytes_ != nullptr);
|
| RTC_DCHECK(index < length());
|
| return static_cast<uint8_t>(bytes_[index]);
|
| }
|
|
|
| void StunByteStringAttribute::SetByte(size_t index, uint8_t value) {
|
| - RTC_DCHECK(bytes_ != NULL);
|
| + RTC_DCHECK(bytes_ != nullptr);
|
| RTC_DCHECK(index < length());
|
| bytes_[index] = value;
|
| }
|
|
|