You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently methods like LoadCursorW and LoadIconW require [*:0]const u16. However, the preferred method to get the u16 string for the cursor or icon, with MakeIntResourceW, can only be done with [*:0]align(1) const u16. It seems that the constants after IDI_APPLICATION and IDC_ARROW are commented out because the pointers are aligned to 1 instead of 2 and cause an error.
Is it reasonable to make any function that takes a [*:0]const u16 that is meant to be use with MakeIntResourceW take [*:0]align(1) const 16 instead?
fnmakeIntResourceW(comptimeresource: usize) [*:0]align(1) constu16 {
// This cast requires that the u16 array is aligned to 1return@ptrFromInt(usize_value);
}
Can also be the below code since that is what is used in the library
Currently methods like
LoadCursorW
andLoadIconW
require[*:0]const u16
. However, the preferred method to get the u16 string for the cursor or icon, withMakeIntResourceW
, can only be done with[*:0]align(1) const u16
. It seems that the constants afterIDI_APPLICATION
andIDC_ARROW
are commented out because the pointers are aligned to 1 instead of 2 and cause an error.Is it reasonable to make any function that takes a
[*:0]const u16
that is meant to be use withMakeIntResourceW
take[*:0]align(1) const 16
instead?The signature would change to the following.
Recreation of
MakeIntResourceW
Can also be the below code since that is what is used in the library
I added the signature in my local library and it fixes the issue and allows for all the constants to be assigned.
The text was updated successfully, but these errors were encountered: