Showing the changes to libraries/script-engine/src/WebSocketClass.cpp (1 of 21 files). Show all
Unified · Split
| @@ -218,8 +218,7 @@ ScriptValue webSocketToScriptValue(ScriptEngine* engine, WebSocketClass* const & · 217 unmodified lines | |||
| 218 | } | 218 | } |
| 219 | 219 | ||
| 220 | bool webSocketFromScriptValue(const ScriptValue &object, WebSocketClass* &out) { | 220 | bool webSocketFromScriptValue(const ScriptValue &object, WebSocketClass* &out) { |
| 221 | out = qobject_cast<WebSocketClass*>(object.toQObject()); | 221 | return (out = qobject_cast<WebSocketClass*>(object.toQObject())) != nullptr; |
| 222 | return true; | ||
| 223 | } | 222 | } |
| 224 | 223 | ||
| 225 | ScriptValue wscReadyStateToScriptValue(ScriptEngine* engine, const WebSocketClass::ReadyState& readyState) { | 224 | ScriptValue wscReadyStateToScriptValue(ScriptEngine* engine, const WebSocketClass::ReadyState& readyState) { |