Repository: godotengine/godot
File: editor/debugger/editor_debugger_inspector.h (C/C++)

Code before:
#pragma once

#include "editor/inspector/editor_inspector.h"

class SceneDebuggerObject;

template <typename K, typename V>
class TypedDictionary;

class EditorDebuggerRemoteObjects : public Object {
	GDCLASS(EditorDebuggerRemoteObjects, Object);

private:
	bool _set_impl(const StringName &p_name, const Variant &p_value, const String &p_field);

protected:
	bool _set(const StringName &p_name, const Variant &p_value);
	bool _get(const StringName &p_name, Variant &r_ret) const;
	void _get_property_list(List<PropertyInfo> *p_list) const;
	static void _bind_methods();

public:
	TypedArray<uint64_t> remote_object_ids;
	String type_name;
	List<PropertyInfo> prop_list;
	HashMap<StringName, Dictionary> prop_values;

	bool _hide_script_from_inspector() { return true; }
	bool _hide_metadata_from_inspector() { return true; }

	void set_property_field(const StringName &p_property, const Variant &p_value, const String &p_field);
	String get_title();
	Variant get_variant(const StringName &p_name);

	void clear() {
		prop_list.clear();
		prop_values.clear();
	}

	void update() { notify_property_list_changed(); }
};

class EditorDebuggerInspector : public EditorInspector {
	GDCLASS(EditorDebuggerInspector, EditorInspector);

private:
	LocalVector<EditorDebuggerRemoteObjects *> remote_objects_list;
	HashSet<Ref<Resource>> remote_dependencies;
	EditorDebuggerRemoteObjects *variables = nullptr;

	void _object_selected(ObjectID p_object);

Review comment (suggestion):
I *think* this isn't necessary. Being scoped within `HashMap` should allow a forward-declare to be all that's needed

Code after:
#pragma once

#include "editor/inspector/editor_inspector.h"

class SceneDebuggerObject;

template <typename K, typename V>
class TypedDictionary;

class EditorDebuggerRemoteObjects : public Object {
	GDCLASS(EditorDebuggerRemoteObjects, Object);

private:
	bool _set_impl(const StringName &p_name, const Variant &p_value, const String &p_field);

protected:
	bool _set(const StringName &p_name, const Variant &p_value);
	bool _get(const StringName &p_name, Variant &r_ret) const;
	void _get_property_list(List<PropertyInfo> *p_list) const;
	static void _bind_methods();

public:
	TypedArray<uint64_t> remote_object_ids;
	String type_name;
	List<PropertyInfo> prop_list;
	HashMap<StringName, TypedDictionary<uint64_t, Variant>> prop_values;

	bool _hide_script_from_inspector() { return true; }
	bool _hide_metadata_from_inspector() { return true; }

	void set_property_field(const StringName &p_property, const Variant &p_value, const String &p_field);
	String get_title();
	Variant get_variant(const StringName &p_name);

	void clear();

	void update() { notify_property_list_changed(); }
};

class EditorDebuggerInspector : public EditorInspector {
	GDCLASS(EditorDebuggerInspector, EditorInspector);

private:
	LocalVector<EditorDebuggerRemoteObjects *> remote_objects_list;
	HashSet<Ref<Resource>> remote_dependencies;
	EditorDebuggerRemoteObjects *variables = nullptr;

	void _object_selected(ObjectID p_object);
	void _objects_edited(const String &p_prop, const TypedDictionary<uint64_t, Variant> &p_values, const String &p_field);

protected: