ronantakizawa/codereview-bench huggingface dataset:
Repository: godotengine/godot
File: editor/file_system/dependency_editor.cpp (C++)

Code before:
	}

	for (int i = 0; i < efsd->get_file_count(); i++) {
		Vector<String> deps = efsd->get_file_deps(i);
		bool found = false;
		for (int j = 0; j < deps.size(); j++) {
			if (deps[j] == editing) {
				found = true;
				break;
			}
		}
		if (!found) {
			continue;
		}

		Ref<Texture2D> icon = EditorNode::get_singleton()->get_class_icon(efsd->get_file_type(i));

		owners->add_item(efsd->get_file_path(i), icon);
	}
}

void DependencyEditorOwners::show(const String &p_path) {
	editing = p_path;
	owners->clear();
	_fill_owners(EditorFileSystem::get_singleton()->get_filesystem());
	popup_centered_ratio(0.3);

	int count = owners->get_item_count();
	if (count > 0) {
		empty->hide();
		owners_count->set_text(vformat(TTR("Owners of: %s (Total: %d)"), p_path.get_file(), count));
		owners_count->show();
		owners_mc->show();
	} else {
		owners_count->hide();
		owners_mc->hide();
		empty->set_text(vformat(TTR("No owners found for: %s"), p_path.get_file()));
		empty->show();
	}
}

DependencyEditorOwners::DependencyEditorOwners() {
	file_options = memnew(PopupMenu);
	add_child(file_options);
	file_options->connect(SceneStringName(id_pressed), callable_mp(this, &DependencyEditorOwners::_file_option));

	VBoxContainer *vbox = memnew(VBoxContainer);
	add_child(vbox);

	owners_count = memnew(Label);
	owners_count->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);

Review comment (suggestion):
Moving the popup after all updates fixes dialog going off screen, but not sure what to do about the size.
As a last resort you can use minimum height + `reset_size()`.

Code after:
	}

	for (int i = 0; i < efsd->get_file_count(); i++) {
		Vector<String> deps = efsd->get_file_deps(i);
		bool found = false;
		for (int j = 0; j < deps.size(); j++) {
			if (deps[j] == editing) {
				found = true;
				break;
			}
		}
		if (!found) {
			continue;
		}

		Ref<Texture2D> icon = EditorNode::get_singleton()->get_class_icon(efsd->get_file_type(i));

		owners->add_item(efsd->get_file_path(i), icon);
	}
}

void DependencyEditorOwners::show(const String &p_path) {
	editing = p_path;
	owners->clear();
	_fill_owners(EditorFileSystem::get_singleton()->get_filesystem());

	int count = owners->get_item_count();
	if (count > 0) {
		empty->hide();
		owners_count->set_text(vformat(TTR("Owners of: %s (Total: %d)"), p_path.get_file(), count));
		owners_count->show();
		owners_mc->show();
	} else {
		owners_count->hide();
		owners_mc->hide();
		empty->set_text(vformat(TTR("No owners found for: %s"), p_path.get_file()));
		empty->show();
	}

	popup_centered_ratio(0.3);
}

DependencyEditorOwners::DependencyEditorOwners() {
	file_options = memnew(PopupMenu);
	add_child(file_options);
	file_options->connect(SceneStringName(id_pressed), callable_mp(this, &DependencyEditorOwners::_file_option));

	VBoxContainer *vbox = memnew(VBoxContainer);
	add_child(vbox);

	owners_count = memnew(Label);
Repository: godotengine/godot
File: editor/scene/canvas_item_editor_plugin.h (C/C++)

Code before:

	// Used for secondary menu items which are displayed depending on the currently selected node
	// (such as MeshInstance's "Mesh" menu).
	PanelContainer *context_toolbar_panel = nullptr;
	HBoxContainer *context_toolbar_hbox = nullptr;
	HashMap<Control *, VSeparator *> context_toolbar_separators;

	void _update_context_toolbar();

	Transform2D transform;
	GridVisibility grid_visibility = GRID_VISIBILITY_SHOW_WHEN_SNAPPING;
	bool show_rulers = true;
	bool show_guides = true;
	bool show_origin = true;
	bool show_viewport = true;
	bool show_helpers = false;
	bool show_position_gizmos = true;
	bool show_lock_gizmos = true;
	bool show_group_gizmos = true;
	bool show_transformation_gizmos = true;

	real_t zoom = 1.0;
	Point2 view_offset;
	Point2 previous_update_view_offset;

	bool resample = true;
	real_t resample_delay = 0.3;

	bool selected_from_canvas = false;

	// Defaults are defined in clear().
	Point2 grid_offset;
	Point2 grid_step;
	Vector2i primary_grid_step;
	int grid_step_multiplier = 0;

	real_t snap_rotation_step = 0.0;
	real_t snap_rotation_offset = 0.0;
	real_t snap_scale_step = 0.0;
	bool use_local_space = true;
	bool smart_snap_active = false;
	bool grid_snap_active = false;

	bool snap_node_parent = true;
	bool snap_node_anchors = true;
	bool snap_node_sides = true;
	bool snap_node_center = true;
	bool snap_other_nodes = true;
	bool snap_guides = true;
	bool snap_rotation = false;
	bool snap_scale = false;

Review comment (suggestion):
Too generic name
```suggestion
	bool resample_enabled = true;
```
(maybe it could still be improved, like `auto_resampling_enabled`, idk)

Code after:

	// Used for secondary menu items which are displayed depending on the currently selected node
	// (such as MeshInstance's "Mesh" menu).
	PanelContainer *context_toolbar_panel = nullptr;
	HBoxContainer *context_toolbar_hbox = nullptr;
	HashMap<Control *, VSeparator *> context_toolbar_separators;

	void _update_context_toolbar();

	Transform2D transform;
	GridVisibility grid_visibility = GRID_VISIBILITY_SHOW_WHEN_SNAPPING;
	bool show_rulers = true;
	bool show_guides = true;
	bool show_origin = true;
	bool show_viewport = true;
	bool show_helpers = false;
	bool show_position_gizmos = true;
	bool show_lock_gizmos = true;
	bool show_group_gizmos = true;
	bool show_transformation_gizmos = true;

	real_t zoom = 1.0;
	Point2 view_offset;
	Point2 previous_update_view_offset;

	Timer *resample_timer = nullptr;
	bool auto_resampling_enabled = true;
	real_t resample_delay = 0.3;

	bool selected_from_canvas = false;

	// Defaults are defined in clear().
	Point2 grid_offset;
	Point2 grid_step;
	Vector2i primary_grid_step;
	int grid_step_multiplier = 0;

	real_t snap_rotation_step = 0.0;
	real_t snap_rotation_offset = 0.0;
	real_t snap_scale_step = 0.0;
	bool use_local_space = true;
	bool smart_snap_active = false;
	bool grid_snap_active = false;

	bool snap_node_parent = true;
	bool snap_node_anchors = true;
	bool snap_node_sides = true;
	bool snap_node_center = true;
	bool snap_other_nodes = true;
	bool snap_guides = true;
	bool snap_rotation = false;
Repository: godotengine/godot
File: servers/rendering/rendering_light_culler.cpp (C++)

Code before:
		int i0 = entry[n_edges]; // Last.
		int i1 = entry[0]; // First.

		const Vector3 &pt0 = frustum_points[i0];
		const Vector3 &pt1 = frustum_points[i1];

		// Create a third point from the light direction.
		Vector3 pt2 = pt0 - p_light_source.dir;

		if (!_is_colinear_tri(pt0, pt1, pt2)) {
			// Create plane from 3 points.
			Plane p(pt0, pt1, pt2);
			r_cull_planes.add_cull_plane(p);
		}
	}

#ifdef LIGHT_CULLER_DEBUG_LOGGING
	if (is_logging()) {
		print_line("lcam.pos is " + String(p_light_source.pos));
	}
#endif

	return true;
}

bool RenderingLightCuller::_add_light_camera_planes(LightCullPlanes &r_cull_planes, const LightSource &p_light_source, const CullParameters &params) {
	if (!data.is_active()) {
		return true;
	}

	const Plane *const cull_frustum_planes = params.frustum_planes;

	switch (p_light_source.type) {
		case LightSource::ST_SPOTLIGHT:
		case LightSource::ST_OMNI:
			break;
		case LightSource::ST_DIRECTIONAL:
			return add_light_camera_planes_directional(r_cull_planes, p_light_source, params);
			break;
		default:
			return false; // not yet supported
			break;
	}

	// Start with 0 cull planes.
	r_cull_planes.num_cull_planes = 0;
	data.out_of_range = false;
	uint32_t lookup = 0;

	// Find which of the camera planes are facing away from the light.
	// We can also test for the situation where the light max range means it cannot

Review comment (suggestion):
```suggestion
bool RenderingLightCuller::_add_light_camera_planes(LightCullPlanes &r_cull_planes, const LightSource &p_light_source, const CullParameters &p_params) {
```

Code after:
	}

	// Last to 0 edge.
	if (n_edges) {
		int i0 = entry[n_edges]; // Last.
		int i1 = entry[0]; // First.

		const Vector3 &pt0 = frustum_points[i0];
		const Vector3 &pt1 = frustum_points[i1];

		// Create a third point from the light direction.
		Vector3 pt2 = pt0 - p_light_source.dir;

		if (!_is_colinear_tri(pt0, pt1, pt2)) {
			// Create plane from 3 points.
			Plane p(pt0, pt1, pt2);
			r_cull_planes.add_cull_plane(p);
		}
	}

#ifdef LIGHT_CULLER_DEBUG_LOGGING
	if (is_logging()) {
		print_line("lcam.pos is " + String(p_light_source.pos));
	}
#endif

	return true;
}

bool RenderingLightCuller::_add_light_camera_planes(LightCullPlanes &r_cull_planes, const LightSource &p_light_source, const CullFrustumData &p_cull_frustum) {
	if (!data.is_active()) {
		return true;
	}

	const Plane *const cull_frustum_planes = p_cull_frustum.frustum_planes;

	switch (p_light_source.type) {
		case LightSource::ST_SPOTLIGHT:
		case LightSource::ST_OMNI:
			break;
		case LightSource::ST_DIRECTIONAL:
			return add_light_camera_planes_directional(r_cull_planes, p_light_source, p_cull_frustum);
			break;
		default:
			return false; // not yet supported
			break;
	}

	// Start with 0 cull planes.
	r_cull_planes.num_cull_planes = 0;
	data.out_of_range = false;
Repository: godotengine/godot
File: servers/rendering/rendering_light_culler.h (C/C++)

Code before:
			ST_SPOTLIGHT,
			ST_OMNI,
		};

		LightSource() {
			type = ST_UNKNOWN;
			angle = 0.0f;
			range = FLT_MAX;
		}

		// All in world space, culling done in world space.
		Vector3 pos;
		Vector3 dir;
		SourceType type;

		float angle; // For spotlight.
		float range;

		int cascade_count;
		float cascade_splits[3]; // Max 4 cascades, which only has 3 splits.
		bool blend_splits;
	};

	struct CullParameters {
		const Plane *frustum_planes; // Functions expect this to store a frustum, so it must be ALWAYS at least Plane[6]. Undefined behavior otherwise.
		const Vector3 *frustum_points; // Functions expect this to store frustum corners, so it must be ALWAYS at least Vector3[8]. UB otherwise.
	};

	// Same order as godot.
	enum PlaneOrder {
		PLANE_NEAR,
		PLANE_FAR,
		PLANE_LEFT,
		PLANE_TOP,
		PLANE_RIGHT,
		PLANE_BOTTOM,
		PLANE_TOTAL,
	};

	// Same order as godot.
	enum PointOrder {
		PT_FAR_LEFT_TOP,
		PT_FAR_LEFT_BOTTOM,
		PT_FAR_RIGHT_TOP,
		PT_FAR_RIGHT_BOTTOM,
		PT_NEAR_LEFT_TOP,
		PT_NEAR_LEFT_BOTTOM,
		PT_NEAR_RIGHT_TOP,
		PT_NEAR_RIGHT_BOTTOM,
	};


Review comment (bug):
Again , good practice to zero these out, unless performance bottleneck.

e.g.
```
const Plane *frustum_planes = nullptr;
const Vector3 *frustum_points = nullptr;
```

Code after:
			ST_SPOTLIGHT,
			ST_OMNI,
		};

		LightSource() {
			type = ST_UNKNOWN;
			angle = 0.0f;
			range = FLT_MAX;
			cascade_count = 0;
			cascade_splits[0] = cascade_splits[1] = cascade_splits[2] = 0;
			blend_splits = false;
		}

		// All in world space, culling done in world space.
		Vector3 pos;
		Vector3 dir;
		SourceType type;

		float angle; // For spotlight.
		float range;

		int cascade_count;
		float cascade_splits[3]; // Max 4 cascades, which only has 3 splits.
		bool blend_splits;
	};

	// Directional lights have separate cull frustums for each cascade, so this struct is needed to specify which one to use for each cull step.
	struct CullFrustumData {
		// Functions expect this to store a frustum, so it must be ALWAYS at least Plane[6]. Undefined behavior otherwise.
		const Plane *frustum_planes = nullptr;
		// Functions expect this to store frustum corners, so it must be ALWAYS at least Vector3[8]. UB otherwise.
		const Vector3 *frustum_points = nullptr;
	};

	// Same order as godot.
	enum PlaneOrder {
		PLANE_NEAR,
		PLANE_FAR,
		PLANE_LEFT,
		PLANE_TOP,
		PLANE_RIGHT,
		PLANE_BOTTOM,
		PLANE_TOTAL,
	};

	// Same order as godot.
	enum PointOrder {
		PT_FAR_LEFT_TOP,
		PT_FAR_LEFT_BOTTOM,
		PT_FAR_RIGHT_TOP,
		PT_FAR_RIGHT_BOTTOM,
Repository: godotengine/godot
File: core/input/input.h (C/C++)

Code before:
		Vector2 screen_velocity;
		Vector2 accum;
		Vector2 screen_accum;
		float accum_t = 0.0f;
		float min_ref_frame;
		float max_ref_frame;

		void update(const Vector2 &p_delta_p, const Vector2 &p_screen_delta_p);
		void reset();
		VelocityTrack();
	};

	struct Joypad {
		StringName name;
		StringName uid;
		bool connected = false;
		bool is_known = false;
		bool last_buttons[(size_t)JoyButton::MAX] = { false };
		float last_axis[(size_t)JoyAxis::MAX] = { 0.0f };
		HatMask last_hat = HatMask::CENTER;
		int mapping = -1;
		int hat_current = 0;
		Dictionary info;
		Input::JoypadFeatures *features = nullptr;
		bool has_vibration : 1;
		bool has_light : 1;
	};

	VelocityTrack mouse_velocity_track;
	HashMap<int, VelocityTrack> touch_velocity_track;
	HashMap<int, Joypad> joy_names;

	HashSet<uint32_t> ignored_device_ids;

	int fallback_mapping = -1; // Index of the guid in map_db.

	CursorShape default_shape = CursorShape::CURSOR_ARROW;

	enum JoyType {
		TYPE_BUTTON,
		TYPE_AXIS,
		TYPE_HAT,
		TYPE_MAX,
	};

	enum JoyAxisRange {
		NEGATIVE_HALF_AXIS = -1,
		FULL_AXIS = 0,
		POSITIVE_HALF_AXIS = 1
	};


Review comment (bug):
I'm not sure if `Bitfields` should be used in a game engine. It might save space, but at the cost of performance. https://stackoverflow.com/a/26658195

@AThousandShips @Ivorforce  What do you think?

According to the `C++ usage guidelines`, there is nothing to suggest otherwise.
https://contributing.godotengine.org/en/latest/engine/guidelines/cpp_usage_guidelines.html

----------

**EDIT:** I also see `bitfield` in the TODO list; it doesn't seem to be done. 😃 

<img width="278" height="129" alt="image" src="https://github.com/user-attachments/assets/3bb3c629-f5b7-4251-9336-4e9346af16c3" />


Code after:
		Vector2 screen_velocity;
		Vector2 accum;
		Vector2 screen_accum;
		float accum_t = 0.0f;
		float min_ref_frame;
		float max_ref_frame;

		void update(const Vector2 &p_delta_p, const Vector2 &p_screen_delta_p);
		void reset();
		VelocityTrack();
	};

	struct Joypad {
		StringName name;
		StringName uid;
		bool connected = false;
		bool is_known = false;
		bool last_buttons[(size_t)JoyButton::MAX] = { false };
		float last_axis[(size_t)JoyAxis::MAX] = { 0.0f };
		HatMask last_hat = HatMask::CENTER;
		int mapping = -1;
		int hat_current = 0;
		Dictionary info;
		bool has_light = false;
		bool has_vibration = false;
		Input::JoypadFeatures *features = nullptr;
	};

	VelocityTrack mouse_velocity_track;
	HashMap<int, VelocityTrack> touch_velocity_track;
	HashMap<int, Joypad> joy_names;

	HashSet<uint32_t> ignored_device_ids;

	int fallback_mapping = -1; // Index of the guid in map_db.

	CursorShape default_shape = CursorShape::CURSOR_ARROW;

	enum JoyType {
		TYPE_BUTTON,
		TYPE_AXIS,
		TYPE_HAT,
		TYPE_MAX,
	};

	enum JoyAxisRange {
		NEGATIVE_HALF_AXIS = -1,
		FULL_AXIS = 0,
		POSITIVE_HALF_AXIS = 1
	};
Repository: godotengine/godot
File: editor/gui/editor_quick_open_dialog.h (C/C++)

Code before:

class Button;
class CenterContainer;
class CheckButton;
class ConfigFile;
class EditorFileSystemDirectory;
class LineEdit;
class HFlowContainer;
class MarginContainer;
class PanelContainer;
class PopupMenu;
class ScrollContainer;
class StringName;
class Texture2D;
class TextureRect;
class VBoxContainer;

class FuzzySearchResult;

class QuickOpenResultItem;

enum class QuickOpenDisplayMode {
	GRID,
	LIST,
};

struct QuickOpenResultCandidate {
	ResourceUID::ID uid;
	Ref<Texture2D> thumbnail;
	const FuzzySearchResult *result = nullptr;

	static QuickOpenResultCandidate from_uid(const ResourceUID::ID &p_uid, bool &success);
	static QuickOpenResultCandidate from_result(const FuzzySearchResult &p_result, bool &success);
};

class HighlightedLabel : public Label {
	GDCLASS(HighlightedLabel, Label)

	Vector<Vector2i> highlights;

	void draw_substr_rects(const Vector2i &p_substr, Vector2 p_offset, int p_line_limit, int line_spacing);

public:
	void add_highlight(const Vector2i &p_interval);
	void reset_highlights();

protected:
	void _notification(int p_notification);
};

class QuickOpenResultContainer : public VBoxContainer {

Review comment (suggestion):
What I meant was more that `file_path` should be the `uid://` string (the one originally loaded which was getting converted). But if it works this way... 🤔

Code after:
class CenterContainer;
class CheckButton;
class ConfigFile;
class EditorFileSystemDirectory;
class LineEdit;
class HFlowContainer;
class MarginContainer;
class PanelContainer;
class PopupMenu;
class ScrollContainer;
class StringName;
class Texture2D;
class TextureRect;
class VBoxContainer;

class FuzzySearchResult;

class QuickOpenResultItem;

enum class QuickOpenDisplayMode {
	GRID,
	LIST,
};

struct QuickOpenResultCandidate {
	ResourceUID::ID uid;
	Ref<Texture2D> thumbnail;
	const FuzzySearchResult *result = nullptr;

	static QuickOpenResultCandidate from_uid(const ResourceUID::ID &p_uid, bool &r_success);
	static QuickOpenResultCandidate from_result(const FuzzySearchResult &p_result, bool &r_success);
};

class HighlightedLabel : public Label {
	GDCLASS(HighlightedLabel, Label)

	Vector<Vector2i> highlights;

	void draw_substr_rects(const Vector2i &p_substr, Vector2 p_offset, int p_line_limit, int line_spacing);

public:
	void add_highlight(const Vector2i &p_interval);
	void reset_highlights();

protected:
	void _notification(int p_notification);
};

class QuickOpenResultContainer : public VBoxContainer {
	GDCLASS(QuickOpenResultContainer, VBoxContainer)
Repository: godotengine/godot
File: editor/gui/editor_quick_open_dialog.h (C/C++)

Code before:
class HFlowContainer;
class MarginContainer;
class PanelContainer;
class PopupMenu;
class ScrollContainer;
class StringName;
class Texture2D;
class TextureRect;
class VBoxContainer;

class FuzzySearchResult;

class QuickOpenResultItem;

enum class QuickOpenDisplayMode {
	GRID,
	LIST,
};

struct QuickOpenResultCandidate {
	ResourceUID::ID uid;
	Ref<Texture2D> thumbnail;
	const FuzzySearchResult *result = nullptr;

	static QuickOpenResultCandidate from_uid(const ResourceUID::ID &p_uid, bool &success);
	static QuickOpenResultCandidate from_result(const FuzzySearchResult &p_result, bool &success);
};

class HighlightedLabel : public Label {
	GDCLASS(HighlightedLabel, Label)

	Vector<Vector2i> highlights;

	void draw_substr_rects(const Vector2i &p_substr, Vector2 p_offset, int p_line_limit, int line_spacing);

public:
	void add_highlight(const Vector2i &p_interval);
	void reset_highlights();

protected:
	void _notification(int p_notification);
};

class QuickOpenResultContainer : public VBoxContainer {
	GDCLASS(QuickOpenResultContainer, VBoxContainer)

	enum {
		FILE_SHOW_IN_FILESYSTEM,
		FILE_SHOW_IN_FILE_MANAGER
	};


Review comment (suggestion):
```suggestion
	static QuickOpenResultCandidate from_uid(const ResourceUID::ID &p_uid, bool &r_success);
	static QuickOpenResultCandidate from_result(const FuzzySearchResult &p_result, bool &r_success);
```

Code after:
class PanelContainer;
class PopupMenu;
class ScrollContainer;
class StringName;
class Texture2D;
class TextureRect;
class VBoxContainer;

class FuzzySearchResult;

class QuickOpenResultItem;

enum class QuickOpenDisplayMode {
	GRID,
	LIST,
};

struct QuickOpenResultCandidate {
	ResourceUID::ID uid;
	Ref<Texture2D> thumbnail;
	const FuzzySearchResult *result = nullptr;

	static QuickOpenResultCandidate from_uid(const ResourceUID::ID &p_uid, bool &r_success);
	static QuickOpenResultCandidate from_result(const FuzzySearchResult &p_result, bool &r_success);
};

class HighlightedLabel : public Label {
	GDCLASS(HighlightedLabel, Label)

	Vector<Vector2i> highlights;

	void draw_substr_rects(const Vector2i &p_substr, Vector2 p_offset, int p_line_limit, int line_spacing);

public:
	void add_highlight(const Vector2i &p_interval);
	void reset_highlights();

protected:
	void _notification(int p_notification);
};

class QuickOpenResultContainer : public VBoxContainer {
	GDCLASS(QuickOpenResultContainer, VBoxContainer)

	enum {
		FILE_SHOW_IN_FILESYSTEM,
		FILE_SHOW_IN_FILE_MANAGER
	};

public:
	void init(const Vector<StringName> &p_base_types);
Repository: godotengine/godot
File: editor/gui/editor_quick_open_dialog.h (C/C++)

Code before:
	void init(const Vector<StringName> &p_base_types);
	void handle_search_box_input(const Ref<InputEvent> &p_ie);
	void set_query_and_update(const String &p_query);
	void update_results();

	bool has_nothing_selected() const;
	ResourceUID::ID get_selected() const;
	String get_selected_path() const;

	bool is_instant_preview_enabled() const;
	void set_instant_preview_toggle_visible(bool p_visible);

	void save_selected_item();
	void cleanup();

	QuickOpenResultContainer();

protected:
	void _notification(int p_what);

private:
	static constexpr int MAX_HISTORY_SIZE = 20;

	Vector<FuzzySearchResult> search_results;
	Vector<StringName> base_types;
	Vector<ResourceUID::ID> uids;
	AHashMap<ResourceUID::ID, StringName> filetypes;
	Vector<QuickOpenResultCandidate> candidates;
	HashSet<ResourceUID::ID> candidates_uids;

	AHashMap<StringName, Vector<ResourceUID::ID>> selected_history;
	HashSet<ResourceUID::ID> history_set;

	String query;
	int selection_index = -1;
	int num_visible_results = 0;
	int max_total_results = 0;

	bool never_opened = true;
	Ref<ConfigFile> history_file;

	QuickOpenDisplayMode content_display_mode = QuickOpenDisplayMode::LIST;
	Vector<QuickOpenResultItem *> result_items;

	ScrollContainer *scroll_container = nullptr;
	VBoxContainer *list = nullptr;
	HFlowContainer *grid = nullptr;
	PopupMenu *file_context_menu = nullptr;

	PanelContainer *panel_container = nullptr;
	CenterContainer *no_results_container = nullptr;

Review comment (suggestion):
This could be LocalVector

```suggestion
	LocalVector<ResourceUID::ID> uids;
```

Code after:
	void set_query_and_update(const String &p_query);
	void update_results();

	bool has_nothing_selected() const;
	ResourceUID::ID get_selected() const;
	String get_selected_path() const;

	bool is_instant_preview_enabled() const;
	void set_instant_preview_toggle_visible(bool p_visible);

	void save_selected_item();
	void cleanup();

	QuickOpenResultContainer();

protected:
	void _notification(int p_what);

private:
	static constexpr int MAX_HISTORY_SIZE = 20;

	Vector<FuzzySearchResult> search_results;
	Vector<StringName> base_types;
	LocalVector<ResourceUID::ID> uids;
	AHashMap<ResourceUID::ID, StringName> filetypes;
	Vector<QuickOpenResultCandidate> candidates;
	HashSet<ResourceUID::ID> candidates_uids;

	AHashMap<StringName, Vector<ResourceUID::ID>> selected_history;
	HashSet<ResourceUID::ID> history_set;

	String query;
	int selection_index = -1;
	int num_visible_results = 0;
	int max_total_results = 0;

	bool never_opened = true;
	Ref<ConfigFile> history_file;

	QuickOpenDisplayMode content_display_mode = QuickOpenDisplayMode::LIST;
	Vector<QuickOpenResultItem *> result_items;

	ScrollContainer *scroll_container = nullptr;
	VBoxContainer *list = nullptr;
	HFlowContainer *grid = nullptr;
	PopupMenu *file_context_menu = nullptr;

	PanelContainer *panel_container = nullptr;
	CenterContainer *no_results_container = nullptr;
	Label *no_results_label = nullptr;