MCPcopy Create free account
hub / github.com/MyGUI/mygui / decode_utf32_block

Method decode_utf32_block

Tools/EditorFramework/pugixml.cpp:1063–1089  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1061 }
1062
1063 static inline typename Traits::value_type decode_utf32_block(
1064 const uint32_t* data,
1065 size_t size,
1066 typename Traits::value_type result)
1067 {
1068 const uint32_t* end = data + size;
1069
1070 while (data < end)
1071 {
1072 uint32_t lead = opt_swap::value ? endian_swap(*data) : *data;
1073
1074 // U+0000..U+FFFF
1075 if (lead < 0x10000)
1076 {
1077 result = Traits::low(result, lead);
1078 data += 1;
1079 }
1080 // U+10000..U+10FFFF
1081 else
1082 {
1083 result = Traits::high(result, lead);
1084 data += 1;
1085 }
1086 }
1087
1088 return result;
1089 }
1090
1091 static inline typename Traits::value_type decode_latin1_block(
1092 const uint8_t* data,

Callers

nothing calls this directly

Calls 1

endian_swapFunction · 0.70

Tested by

no test coverage detected