HomeWildfire Games

Replace ScriptInterface::Call* with new ScriptFunction functions

Description

Replace ScriptInterface::Call* with new ScriptFunction functions

Finishes work started in rP24969.
This removes the boost-CPP function wrappers entirely, in favour of pure templated code in FunctionWrapper.h
The Call* functions were already heavily templated, so there is nothing really new here. I just use tag dispatch to reduce the number of overloads slightly.

The new functions do not need the script interface, only the script request.

Differential Revision: https://code.wildfiregames.com/D3912

Event Timeline

vladislavbelov added inline comments.
/ps/trunk/source/scriptinterface/FunctionWrapper.h
238

Wrong name.

267

Might be handled by a proper argument list (without R& ret).

vladislavbelov added inline comments.May 1 2021, 4:31 PM
/ps/trunk/source/scriptinterface/FunctionWrapper.h
211

Wrong name.

212

Wrong name.

wraitii added inline comments.May 1 2021, 4:33 PM
/ps/trunk/source/scriptinterface/FunctionWrapper.h
267

Not sure what you mean?

vladislavbelov added inline comments.May 1 2021, 4:34 PM
/ps/trunk/source/scriptinterface/FunctionWrapper.h
217

Wrong type.

224

Broken style.

vladislavbelov added inline comments.May 1 2021, 4:37 PM
/ps/trunk/source/scriptinterface/FunctionWrapper.h
267

For example put different branches of if constexpr (std::is_same_v<R, JS::MutableHandleValue>) in separate functions.

phosit added a subscriber: phosit.Jan 29 2023, 3:55 PM
phosit added inline comments.
/ps/trunk/source/scriptinterface/FunctionWrapper.h
355

std::forward doesn't make sense here.