mirror of
https://github.com/odin-lang/Odin.git
synced 2026-04-30 18:24:00 +00:00
Remove unneeded uses of intrinsics.constant_utf16_cstring
This commit is contained in:
@@ -919,7 +919,7 @@ win32_wstring_to_utf8 :: proc(s: cstring16, allocator: runtime.Allocator) -> (re
|
|||||||
@(private="package")
|
@(private="package")
|
||||||
win32_utf16_to_utf8 :: proc{
|
win32_utf16_to_utf8 :: proc{
|
||||||
win32_utf16_string16_to_utf8,
|
win32_utf16_string16_to_utf8,
|
||||||
win32_utf16_u16_to_utf8
|
win32_utf16_u16_to_utf8,
|
||||||
}
|
}
|
||||||
|
|
||||||
@(private="package", require_results)
|
@(private="package", require_results)
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ lcid_to_local :: proc(t: ^testing.T) {
|
|||||||
exp :: "en-US"
|
exp :: "en-US"
|
||||||
testing.expectf(t, str == exp, "%v (should be: %v)", str, exp)
|
testing.expectf(t, str == exp, "%v (should be: %v)", str, exp)
|
||||||
|
|
||||||
cc2 := win32.LocaleNameToLCID(L(exp), 0)
|
cc2 := win32.LocaleNameToLCID(exp, 0)
|
||||||
testing.expectf(t, cc2 == 0x0409, "%#x (should be: %#x)", u32(cc2), 0x0409)
|
testing.expectf(t, cc2 == 0x0409, "%#x (should be: %#x)", u32(cc2), 0x0409)
|
||||||
|
|
||||||
//fmt.printfln("%0X", lcid)
|
//fmt.printfln("%0X", lcid)
|
||||||
|
|||||||
@@ -12,11 +12,11 @@ UTF16_Vector :: struct {
|
|||||||
|
|
||||||
utf16_vectors := []UTF16_Vector{
|
utf16_vectors := []UTF16_Vector{
|
||||||
{
|
{
|
||||||
intrinsics.constant_utf16_cstring("Hellope, World!"),
|
"Hellope, World!",
|
||||||
"Hellope, World!",
|
"Hellope, World!",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
intrinsics.constant_utf16_cstring("Hellope\x00, World!"),
|
"Hellope\x00, World!",
|
||||||
"Hellope",
|
"Hellope",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user