History

Fixes for code review

ksuprynowicz committed 4 years ago

Commit 586bd7f1 parent e9bfdd416 files · +142 −117Browse files

Showing the changes to libraries/script-engine/src/ScriptEngineCast.h (1 of 16 files). Show all

Unified · Split

libraries/script-engine/src/ScriptEngineCast.h+0−18
@@ -115,24 +115,6 @@ int scriptRegisterMetaTypeWithLambdas(ScriptEngine* eng, · 114 unmodified lines
115115 return id;
116116 }
117117
118−/*
119−template <typename T>
120−int scriptRegisterMetaTypeWithLambdas(ScriptEngine* eng,
121− ScriptValue (*toScriptValue)(ScriptEngine*, const T& t),
122− bool (*fromScriptValue)(const ScriptValue&, T& t), const char* name = "",
123− T* = 0)
124−{
125− int id;
126− if (strlen(name) > 0) { // make sure it's registered
127− id = qRegisterMetaType<T>(name);
128− } else {
129− id = qRegisterMetaType<T>();
130− }
131− eng->registerCustomType(id, reinterpret_cast<ScriptEngine::MarshalFunction>(toScriptValue),
132− reinterpret_cast<ScriptEngine::DemarshalFunction>(fromScriptValue));
133− return id;
134−}*/
135−
136118 template <class Container>
137119 ScriptValue scriptValueFromSequence(ScriptEngine* eng, const Container& cont) {
138120 ScriptValue a = eng->newArray();