In the c++ tutorial would it be possible for you to cover typedef? Most of the tutorials online cover really simple cases like: typedef int int_t; Godot sometimes uses typedef in more confusing ways that I don't think most tutorials prepare you for. An example of Godot using typedefs in a complex way is here in visual_script.h:
typedef Ref<VisualScriptNode> (*VisualScriptNodeRegisterFunc)(const String &p_type);
they later use this typedef in a Map:
Map<String, VisualScriptNodeRegisterFunc> register_funcs;
Another example is here:
typedef bool (*CompareEqualFunc)(const CallableCustom *p_a, const CallableCustom *p_b);
Can you explain how these type of typedefs work and why they are used?
In the c++ tutorial would it be possible for you to cover typedef? Most of the tutorials online cover really simple cases like:
typedef int int_t;Godot sometimes uses typedef in more confusing ways that I don't think most tutorials prepare you for. An example of Godot using typedefs in a complex way is here in visual_script.h:typedef Ref<VisualScriptNode> (*VisualScriptNodeRegisterFunc)(const String &p_type);they later use this typedef in a Map:
Map<String, VisualScriptNodeRegisterFunc> register_funcs;Another example is here:
typedef bool (*CompareEqualFunc)(const CallableCustom *p_a, const CallableCustom *p_b);Can you explain how these type of typedefs work and why they are used?