Skip to content

Commit f74d51a

Browse files
authored
Fix compile warnings in embind_benchmark (#17382)
1 parent fd0d825 commit f74d51a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/embind/embind_benchmark.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ class Foo
146146
class Interface
147147
{
148148
public:
149+
virtual ~Interface() {}
149150
virtual void call0() = 0;
150151
virtual std::wstring call1(const std::wstring& str1, const std::wstring& str2) = 0;
151152
virtual void call_with_typed_array(size_t size, const void*) = 0;
@@ -170,11 +171,11 @@ class InterfaceWrapper : public emscripten::wrapper<Interface>
170171
return call<void>(call0_symbol);
171172
}
172173

173-
std::wstring call1(const std::wstring& str1, const std::wstring& str2) {
174+
std::wstring call1(const std::wstring& str1, const std::wstring& str2) override {
174175
return call<std::wstring>(call1_symbol, str1, str2);
175176
}
176177

177-
void call_with_typed_array(size_t size, const void* data) {
178+
void call_with_typed_array(size_t size, const void* data) override {
178179
return call<void>(
179180
call_with_typed_array_symbol,
180181
emscripten::val::global(Uint8Array_symbol).new_(
@@ -183,7 +184,7 @@ class InterfaceWrapper : public emscripten::wrapper<Interface>
183184
size));
184185
}
185186

186-
void call_with_memory_view(size_t size, const unsigned int* data) {
187+
void call_with_memory_view(size_t size, const unsigned int* data) override {
187188
return call<void>(
188189
call_with_memory_view_symbol,
189190
emscripten::typed_memory_view(size, data));

0 commit comments

Comments
 (0)