Skip to content

Explicitly cast to the narrowing type#26901

Open
Knightly1 wants to merge 1 commit intoprotocolbuffers:mainfrom
Knightly1:fix_msvc_warnings
Open

Explicitly cast to the narrowing type#26901
Knightly1 wants to merge 1 commit intoprotocolbuffers:mainfrom
Knightly1:fix_msvc_warnings

Conversation

@Knightly1
Copy link
Copy Markdown

@Knightly1 Knightly1 commented Apr 15, 2026

  • Address MSVC warnings about narrowing conversions
  • Every place capacity and CalculateCapacityForSize are used they are used as map_index_t, so modify that from size_t

I've validated that every place where a narrowing conversion was used already had guards in place, so the only issue is the implicit narrowing conversion itself.

- Address MSVC warnings about narrowing conversions
- Every place capacity and CalculateCapacityForSize are used they are used as map_index_t, so modify that from size_t
@google-cla
Copy link
Copy Markdown

google-cla bot commented Apr 15, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

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.

1 participant