Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix MSVC cast warnings#28967

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ianthomas23 merged 4 commits intomatplotlib:mainfromQuLogic:msvc-casts
Oct 25, 2024
Merged

Conversation

QuLogic
Copy link
Member

PR summary

MSVC on the Azure/AppVeyor builds currently produce a few warnings. These are due to some lax input types, or otherwise because of differing type sizes on Windows. The values are generally not in the range where it would matter, so we can make the casts explicit to silence the warnings.

For the incorrect types, the old types are deprecated, but still accepted.

This is based on#28842 at the moment due to conflicting changes, but the last four commits are the relevant ones here.

PR checklist

@QuLogic
Copy link
MemberAuthor

I see one more on AppVeyor to fix:

  [80/97] Compiling C++ object src/ft2font.cp311-win_amd64.pyd.p/ft2font_wrapper.cpp.obj  ../../src/ft2font_wrapper.cpp(964): warning C4244: 'argument': conversion from 'double' to 'int', possible loss of data  ../../src/ft2font_wrapper.cpp(964): warning C4244: 'argument': conversion from 'double' to 'int', possible loss of data

These were silently truncated to int anyway, so we should make the typesexplicit.
The Agg API uses `double`s here, but the array sizes are`pybind11::ssize_t`, which are technically bigger (in some ways), andcause a warning on MSVC. We don't accept a backing surface larger than~2^24, so there's no worry about these overflowing.
These were silently truncated to int anyway, so we should make the typesexplicit.
@QuLogicQuLogic removed backend: pdf Documentation: examplesfiles in galleries/examples labelsOct 24, 2024
@QuLogic
Copy link
MemberAuthor

AppVeyor and Azure Windows builds are now warning free.

@QuLogicQuLogic marked this pull request as ready for reviewOctober 24, 2024 22:54
@QuLogicQuLogic added this to thev3.10.0 milestoneOct 24, 2024
@ianthomas23ianthomas23 merged commit3770dfe intomatplotlib:mainOct 25, 2024
65 of 66 checks passed
@QuLogicQuLogic deleted the msvc-casts branchOctober 25, 2024 08:24
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@tacaswelltacaswelltacaswell approved these changes

@ianthomas23ianthomas23ianthomas23 approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
v3.10.0
Development

Successfully merging this pull request may close these issues.

3 participants
@QuLogic@tacaswell@ianthomas23

[8]ページ先頭

©2009-2025 Movatter.jp