summaryrefslogtreecommitdiff
path: root/third_party/base/stl_util.h
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-12-22 14:44:49 -0800
committerLei Zhang <thestig@chromium.org>2015-12-22 14:44:49 -0800
commitba2586d2c0a50df14aa2549a0a841e1d4b9af4b6 (patch)
treed36be5c25b4e31db2ccd7fd1a28471fee575773d /third_party/base/stl_util.h
parentbe9095d0b2819cdc88785b0b4fdfccf837eb96a9 (diff)
downloadpdfium-ba2586d2c0a50df14aa2549a0a841e1d4b9af4b6.tar.xz
Start using allowed C++11 features.
R=dml@google.com, thakis@chromium.org Review URL: https://codereview.chromium.org/1544923002 .
Diffstat (limited to 'third_party/base/stl_util.h')
-rw-r--r--third_party/base/stl_util.h15
1 files changed, 0 insertions, 15 deletions
diff --git a/third_party/base/stl_util.h b/third_party/base/stl_util.h
index 50e9341569..32656038c1 100644
--- a/third_party/base/stl_util.h
+++ b/third_party/base/stl_util.h
@@ -5,23 +5,8 @@
#ifndef PDFIUM_THIRD_PARTY_BASE_STL_UTIL_H_
#define PDFIUM_THIRD_PARTY_BASE_STL_UTIL_H_
-#include <vector>
-
namespace pdfium {
-// To treat a possibly-empty vector as an array, use these functions.
-// If you know the array will never be empty, you can use &*v.begin()
-// directly, but that is undefined behaviour if |v| is empty.
-template <typename T>
-inline T* vector_as_array(std::vector<T>* v) {
- return v->empty() ? nullptr : &*v->begin();
-}
-
-template <typename T>
-inline const T* vector_as_array(const std::vector<T>* v) {
- return v->empty() ? nullptr : &*v->begin();
-}
-
// Test to see if a set, map, hash_set or hash_map contains a particular key.
// Returns true if the key is in the collection.
template <typename Collection, typename Key>