Skip to content

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