wxDataObject::IsSupportedFormat optimization#24981
Open
hwiesmann wants to merge 1 commit intowxWidgets:masterfrom
Open
wxDataObject::IsSupportedFormat optimization#24981hwiesmann wants to merge 1 commit intowxWidgets:masterfrom
hwiesmann wants to merge 1 commit intowxWidgets:masterfrom
Conversation
Contributor
|
I think wxGTK implementation is actually the same too because |
Contributor
Author
|
Hi,
Actually, I did not have a look at wxDataFormat::operator==(). If it calls wxGTKIsSameFormat(), then wxDataObjectBase::IsSupported can be used for GTK, too.
… Am 28.11.2024 um 01:25 schrieb VZ ***@***.***>:
I think wxGTK implementation is actually the same too because wxDataFormat::operator==() calls the same wxGTKIsSameFormat() as is called there, so I'd really just define IsSupportedFormat() as a trivial inline wrapper in wxDataObjectBase itself and remove all the other definitions completely. What do you think?
—
Reply to this email directly, view it on GitHub <#24981 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAD6V3EDOKVVPAQ57AN24V32CZPHRAVCNFSM6AAAAABST2JJMGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMBVGA2DANZZHA>.
You are receiving this because you authored the thread.
|
Contributor
Just to check: do you plan to update this PR to do it? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In general, wxDataObject::IsSupportedFormat is not documented, though wxDataObjectBase::IsSupported is.
On macOS, qt and X11 wxDataObject::IsSupportedFormat's implementation is identical to wxDataObjectBase::IsSupported. Therefore, on these platforms wxDataObject::IsSupportedFormat is now calling wxDataObjectBase::IsSupported.
On MSW wxDataObject::IsSupportedFormat is not defined as on all the other platforms (missing direction parameter). But the current implementation already calls wxDataObjectBase::IsSupported.
On GTK wxDataObject::IsSupportedFormat is slightly differently implemented and its implementation is therefore kept.