mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-10-13 15:34:37 +00:00
Replace ScriptInterface::Call* with new ScriptFunction functions
Finishes work started in f3aedf88a6.
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
This was SVN commit r25354.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2020 Wildfire Games.
|
||||
/* Copyright (C) 2021 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@@ -19,6 +19,7 @@
|
||||
|
||||
#include "DebugSerializer.h"
|
||||
|
||||
#include "scriptinterface/FunctionWrapper.h"
|
||||
#include "scriptinterface/ScriptInterface.h"
|
||||
|
||||
#include "lib/secure_crt.h"
|
||||
@@ -156,7 +157,7 @@ void CDebugSerializer::PutScriptVal(const char* name, JS::MutableHandleValue val
|
||||
{
|
||||
// If the value has a Serialize property, pretty-parse that instead.
|
||||
// (this gives more accurate OOS reports).
|
||||
m_ScriptInterface.CallFunction(value, "Serialize", &serialize);
|
||||
ScriptFunction::Call(rq, value, "Serialize", &serialize);
|
||||
std::string serialized_source = m_ScriptInterface.ToString(&serialize, true);
|
||||
m_Stream << INDENT << name << ": " << serialized_source << "\n";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user