summaryrefslogtreecommitdiff
path: root/third_party/base/stl_util.h
diff options
context:
space:
mode:
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>