Codegen for nullable structs in friendly overloads could be optimized #277
Labels
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
Example from
CredUIPromptForWindowsCredentials
:pUiInfo.HasValue ? pUiInfo.Value : default(CREDUI_INFOW);
could be replaced withpUiInfo ?? default
which is more idiomatic C# and which compiles topUiInfo.GetValueOrDefault()
which IIRC is jitted as direct field access. Whereas calling.Value
adds an additional redundant check and looks more complex.(Version used: 0.1.422-beta)
The text was updated successfully, but these errors were encountered: