summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsystem/include/emscripten/wire.h53
1 files changed, 27 insertions, 26 deletions
diff --git a/system/include/emscripten/wire.h b/system/include/emscripten/wire.h
index 5126c4be..07919a5e 100755
--- a/system/include/emscripten/wire.h
+++ b/system/include/emscripten/wire.h
@@ -231,20 +231,6 @@ namespace emscripten {
}
};
- template<typename Enum>
- struct EnumBindingType {
- typedef Enum WireType;
-
- static WireType toWireType(Enum v) {
- return v;
- }
- static Enum fromWireType(WireType v) {
- return v;
- }
- static void destroy(WireType) {
- }
- };
-
template<typename T>
struct GenericBindingType {
typedef typename std::remove_reference<T>::type ActualT;
@@ -263,6 +249,7 @@ namespace emscripten {
}
};
+ // Is this necessary?
template<typename T>
struct GenericBindingType<std::unique_ptr<T>> {
typedef typename BindingType<T>::WireType WireType;
@@ -272,19 +259,18 @@ namespace emscripten {
}
};
- template<typename T>
- struct WireDeleter {
- typedef typename BindingType<T>::WireType WireType;
-
- WireDeleter(WireType wt)
- : wt(wt)
- {}
-
- ~WireDeleter() {
- BindingType<T>::destroy(wt);
+ template<typename Enum>
+ struct EnumBindingType {
+ typedef Enum WireType;
+
+ static WireType toWireType(Enum v) {
+ return v;
+ }
+ static Enum fromWireType(WireType v) {
+ return v;
+ }
+ static void destroy(WireType) {
}
-
- WireType wt;
};
// catch-all generic binding
@@ -299,5 +285,20 @@ namespace emscripten {
auto toWireType(const T& v) -> typename BindingType<T>::WireType {
return BindingType<T>::toWireType(v);
}
+
+ template<typename T>
+ struct WireDeleter {
+ typedef typename BindingType<T>::WireType WireType;
+
+ WireDeleter(WireType wt)
+ : wt(wt)
+ {}
+
+ ~WireDeleter() {
+ BindingType<T>::destroy(wt);
+ }
+
+ WireType wt;
+ };
}
}