Skip to content
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

Allow calling SDLx::Surface draw methods with blessed vectors #290

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jjatria
Copy link

@jjatria jjatria commented Jun 3, 2019

Before this patch, validation of vectors used for coordinates
in SDLx::Surface draw methods checked with

ref $vector eq 'ARRAY'

However, this meant that it was impossible to use these methods
with eg. an array-based vector class.

To support this, the check is now made with Scalar::Util::reftype,
which more accurately represents what this test is checking.

Before this patch, validation of vectors used for coordinates
in SDLx::Surface draw methods checked with

    ref $vector eq 'ARRAY'

However, this meant that it was impossible to use these methods
with eg. an array-based vector class.

To support this, the check is now made with Scalar::Util::reftype,
which more accurately represents what this test is checking.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant