diff options
-rw-r--r-- | include/wabt/common.h | 2 | ||||
-rw-r--r-- | include/wabt/interp/interp-inl.h | 4 | ||||
-rw-r--r-- | src/resolve-names.cc | 12 | ||||
-rw-r--r-- | src/wast-lexer.cc | 2 |
4 files changed, 10 insertions, 10 deletions
diff --git a/include/wabt/common.h b/include/wabt/common.h index 2ae1fa1f..54aeb912 100644 --- a/include/wabt/common.h +++ b/include/wabt/common.h @@ -166,7 +166,7 @@ Dst WABT_VECTORCALL Bitcast(Src&& value) { template <typename T> void ZeroMemory(T& v) { - WABT_STATIC_ASSERT(std::is_pod<T>::value); + WABT_STATIC_ASSERT(std::is_trivial<T>::value); memset(&v, 0, sizeof(v)); } diff --git a/include/wabt/interp/interp-inl.h b/include/wabt/interp/interp-inl.h index 23a70e98..1f3402c6 100644 --- a/include/wabt/interp/interp-inl.h +++ b/include/wabt/interp/interp-inl.h @@ -145,7 +145,7 @@ inline bool FreeList<Ref>::IsUsed(Index index) const { } template <> -inline FreeList<Ref>::~FreeList<Ref>() {} +inline FreeList<Ref>::~FreeList() {} template <> template <typename... Args> @@ -181,7 +181,7 @@ bool FreeList<T>::IsUsed(Index index) const { } template <typename T> -FreeList<T>::~FreeList<T>() { +FreeList<T>::~FreeList() { for (auto object : list_) { if ((reinterpret_cast<uintptr_t>(object) & ptrFreeBit) == 0) { delete object; diff --git a/src/resolve-names.cc b/src/resolve-names.cc index 9f0b3b02..b4355350 100644 --- a/src/resolve-names.cc +++ b/src/resolve-names.cc @@ -488,12 +488,12 @@ void NameResolver::VisitFunc(Func* func) { ResolveFuncTypeVar(&func->decl.type_var); } - func->bindings.FindDuplicates( - [=](const BindingHash::value_type& a, const BindingHash::value_type& b) { - const char* desc = - (a.second.index < func->GetNumParams()) ? "parameter" : "local"; - PrintDuplicateBindingsError(a, b, desc); - }); + func->bindings.FindDuplicates([func, this](const BindingHash::value_type& a, + const BindingHash::value_type& b) { + const char* desc = + (a.second.index < func->GetNumParams()) ? "parameter" : "local"; + PrintDuplicateBindingsError(a, b, desc); + }); visitor_.VisitFunc(func); current_func_ = nullptr; diff --git a/src/wast-lexer.cc b/src/wast-lexer.cc index 1f89c3ff..bc781589 100644 --- a/src/wast-lexer.cc +++ b/src/wast-lexer.cc @@ -180,7 +180,7 @@ Token WastLexer::GetToken() { } Location WastLexer::GetLocation() { - auto column = [=](const char* p) { + auto column = [this](const char* p) { return std::max(1, static_cast<int>(p - line_start_ + 1)); }; return Location(filename_, line_, column(token_start_), column(cursor_)); |