History

Noop change with more declarations, in hopes of convincing MSVS how lambdas work. (Hey, it's worth a try...)

Howard Stearns committed 11 years ago

Commit 069e6231 parent 1b134d61 file · +6 −6Browse files

Showing the changes to libraries/script-engine/src/ScriptEngine.cpp (1 of 1 file). Show all

Unified · Split

libraries/script-engine/src/ScriptEngine.cpp+6−6
@@ -434,16 +434,16 @@ void ScriptEngine::addEventHandler(const EntityItemID& entityID, const QString& · 433 unmodified lines
434 });434 });
435 435
436 // Two common cases of event handler, differing only in argument signature.436 // Two common cases of event handler, differing only in argument signature.
437 auto makeSingleEntityHandler = [=](const QString& eventName) {437 auto makeSingleEntityHandler = [=](const QString& eventName) -> std::function<void(const EntityItemID&)> {
438 return [=](const EntityItemID& entityItemID) {438 return [=](const EntityItemID& entityItemID) -> void {
439 generalHandler(entityItemID, eventName, [=]() {439 generalHandler(entityItemID, eventName, [=]() -> QScriptValueList {
440 return QScriptValueList() << entityItemID.toScriptValue(this);440 return QScriptValueList() << entityItemID.toScriptValue(this);
441 });441 });
442 };442 };
443 };443 };
444 auto makeMouseHandler = [=](const QString& eventName) {444 auto makeMouseHandler = [=](const QString& eventName) -> std::function<void(const EntityItemID&, const MouseEvent&)> {
445 return [=](const EntityItemID& entityItemID, const MouseEvent& event) {445 return [=](const EntityItemID& entityItemID, const MouseEvent& event) -> void {
446 generalHandler(entityItemID, eventName, [=]() {446 generalHandler(entityItemID, eventName, [=]() -> QScriptValueList {
447 return QScriptValueList() << entityItemID.toScriptValue(this) << event.toScriptValue(this);447 return QScriptValueList() << entityItemID.toScriptValue(this) << event.toScriptValue(this);
448 });448 });
449 };449 };