From 74e35f1d626f8f621c2869a317c8acef018c7918 Mon Sep 17 00:00:00 2001 From: kwiberg Date: Mon, 23 Nov 2015 06:54:51 -0800 Subject: [PATCH] Remove the special case for std::vector in rtc::ArrayView We don't need it anymore now that we can use std::vector::data(). Review URL: https://codereview.webrtc.org/1470843003 Cr-Commit-Position: refs/heads/master@{#10755} --- webrtc/base/array_view.h | 8 -------- 1 file changed, 8 deletions(-) diff --git a/webrtc/base/array_view.h b/webrtc/base/array_view.h index 02676f17d1..c77a6e16b4 100644 --- a/webrtc/base/array_view.h +++ b/webrtc/base/array_view.h @@ -11,8 +11,6 @@ #ifndef WEBRTC_BASE_ARRAY_VIEW_H_ #define WEBRTC_BASE_ARRAY_VIEW_H_ -#include - #include "webrtc/base/checks.h" namespace rtc { @@ -50,12 +48,6 @@ class ArrayView final { // std::vector). template ArrayView(U& u) : ArrayView(u.data(), u.size()) {} - // TODO(kwiberg): Remove the special case for std::vector (and the include of - // ); it is handled by the general case in C++11, since std::vector - // has a data() method there. - template - ArrayView(std::vector& u) - : ArrayView(u.empty() ? nullptr : &u[0], u.size()) {} // Indexing, size, and iteration. These allow mutation even if the ArrayView // is const, because the ArrayView doesn't own the array. (To prevent