summaryrefslogtreecommitdiff
path: root/src/common.h
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2017-11-28 16:46:41 -0800
committerGitHub <noreply@github.com>2017-11-28 16:46:41 -0800
commitb3a971b43a0a6fa4d15decb6d55a192b00723fa8 (patch)
treedb6315d9df60baf88ee0d42eb8d53b8c507af203 /src/common.h
parentcd5a893ccc93628569d39c36e4366c5dc5d48068 (diff)
downloadwabt-b3a971b43a0a6fa4d15decb6d55a192b00723fa8.tar.gz
wabt-b3a971b43a0a6fa4d15decb6d55a192b00723fa8.tar.bz2
wabt-b3a971b43a0a6fa4d15decb6d55a192b00723fa8.zip
Fix ubsan build and remove workaround in favor of ubsan.blacklist (#678)
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;