diff options
author | Sam Clegg <sbc@chromium.org> | 2017-11-28 16:46:41 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-28 16:46:41 -0800 |
commit | b3a971b43a0a6fa4d15decb6d55a192b00723fa8 (patch) | |
tree | db6315d9df60baf88ee0d42eb8d53b8c507af203 /src/common.h | |
parent | cd5a893ccc93628569d39c36e4366c5dc5d48068 (diff) | |
download | wabt-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.h | 9 |
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; |