Skip to content

Update data_preferences.rst #10806

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 9, 2025
Merged

Update data_preferences.rst #10806

merged 2 commits into from
Apr 9, 2025

Conversation

tredstart
Copy link
Contributor

Change the OrderedHashMap to HashMap to remove potential confusion and keep docs in sync with the actual implementation.

Currently docs point to the not-existing class OrderedHashMap .
Dictionary, instead, uses a different class HashMap

struct DictionaryPrivate {
	SafeRefCount refcount;
	Variant *read_only = nullptr; // If enabled, a pointer is used to a temporary value that is used to return read-only values.
	HashMap<Variant, Variant, VariantHasher, StringLikeVariantComparator> variant_map;
	ContainerTypeValidate typed_key;
	ContainerTypeValidate typed_value;
	Variant *typed_fallback = nullptr; // Allows a typed dictionary to return dummy values when attempting an invalid access.
};

Change the `OrderedHashMap` to `HashMap` to remove potential confusion and keep docs in sync with the actual implementation
remove unnecessary ';'

Co-authored-by: A Thousand Ships <[email protected]>
@skyace65 skyace65 added enhancement area:manual Issues and PRs related to the Manual/Tutorials section of the documentation labels Apr 1, 2025
Copy link
Contributor

@skyace65 skyace65 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed this is how dictionary is implemented in dictionary.cpp in the engine.

@skyace65 skyace65 merged commit cf33eb6 into godotengine:master Apr 9, 2025
2 checks passed
@skyace65
Copy link
Contributor

skyace65 commented Apr 9, 2025

Thanks! And congrats on your first merged PR!

@tredstart
Copy link
Contributor Author

Thanks! And congrats on your first merged PR!

Thanks :) I will try to contribute more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:manual Issues and PRs related to the Manual/Tutorials section of the documentation enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants