summaryrefslogtreecommitdiff
path: root/src/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common.h')
-rw-r--r--src/common.h9
1 files changed, 0 insertions, 9 deletions
diff --git a/src/common.h b/src/common.h
index 1709e506..342316b2 100644
--- a/src/common.h
+++ b/src/common.h
@@ -126,15 +126,6 @@ void Destruct(T& placement) {
placement.~T();
}
-// Calls data() on vector, string, etc. but will return nullptr if the
-// container is empty.
-// TODO(binji): this should probably be removed when there is a more direct way
-// to represent a memory slice (e.g. something similar to GSL's span)
-template <typename T>
-typename T::value_type* DataOrNull(T& container) {
- return container.empty() ? nullptr : container.data();
-}
-
inline std::string WABT_PRINTF_FORMAT(1, 2)
StringPrintf(const char* format, ...) {
va_list args;