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

cast uniform location to uint32_t #77

Merged

Conversation

watasuke102
Copy link
Member

Context

Currently build fails by the following error:

/home/watasuke/program/zwin/zen-remote/src/client/gl-base-technique.cc:145:58: error: non-constant-expression cannot be narrowed from type 'int32_t' (aka 'int') to 'unsigned int' in initializer list [-Wc++11-narrowing-const-reference]
  145 |                     std::pair<uint32_t, UniformVariable>{location, {}});
      |                                                          ^~~~~~~~

Summary

cast location to uint32_t; location is positive number on this (changed) line, so casting is safe

How to check the behavior

Build succeeds without errors

@watasuke102 watasuke102 requested a review from a team as a code owner December 4, 2024 08:10
@watasuke102 watasuke102 requested review from Aki-7 and removed request for a team December 4, 2024 08:10
@watasuke102 watasuke102 merged commit d6ee6e9 into zwin-project:main Dec 4, 2024
1 check passed
@watasuke102 watasuke102 deleted the u32-for-uniform-location branch December 4, 2024 14:02
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.

2 participants