Fix compiling the jsonrpc module.

This commit is contained in:
Relintai 2023-10-02 18:51:44 +02:00
parent 96702b39c8
commit 01d1d1aa24
3 changed files with 15 additions and 9 deletions

View File

@ -31,13 +31,13 @@
#ifndef JSONRPC_H #ifndef JSONRPC_H
#define JSONRPC_H #define JSONRPC_H
#include "core/object.h" #include "core/object/object.h"
#include "core/variant.h" #include "core/variant/variant.h"
class JSONRPC : public Object { class JSONRPC : public Object {
GDCLASS(JSONRPC, Object) GDCLASS(JSONRPC, Object)
Map<String, Object *> method_scopes; RBMap<String, Object *> method_scopes;
protected: protected:
static void _bind_methods(); static void _bind_methods();

View File

@ -29,12 +29,16 @@
/**************************************************************************/ /**************************************************************************/
#include "register_types.h" #include "register_types.h"
#include "core/class_db.h"
#include "core/object/class_db.h"
#include "jsonrpc.h" #include "jsonrpc.h"
void register_jsonrpc_types() { void register_jsonrpc_types(ModuleRegistrationLevel p_level) {
ClassDB::register_class<JSONRPC>(); if (p_level == MODULE_REGISTRATION_LEVEL_SCENE) {
ClassDB::register_class<JSONRPC>();
}
} }
void unregister_jsonrpc_types() { void unregister_jsonrpc_types(ModuleRegistrationLevel p_level) {
} }

View File

@ -31,7 +31,9 @@
#ifndef JSONRPC_REGISTER_TYPES_H #ifndef JSONRPC_REGISTER_TYPES_H
#define JSONRPC_REGISTER_TYPES_H #define JSONRPC_REGISTER_TYPES_H
void register_jsonrpc_types(); #include "modules/register_module_types.h"
void unregister_jsonrpc_types();
void register_jsonrpc_types(ModuleRegistrationLevel p_level);
void unregister_jsonrpc_types(ModuleRegistrationLevel p_level);
#endif // JSONRPC_REGISTER_TYPES_H #endif // JSONRPC_REGISTER_TYPES_H