MCPcopy Create free account
hub / github.com/WinMerge/winmerge / queryConvert

Method queryConvert

Externals/poco/Encodings/src/DoubleByteEncoding.cpp:111–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109
110
111int DoubleByteEncoding::queryConvert(const unsigned char* bytes, int length) const
112{
113 int n = _charMap[*bytes];
114 switch (n)
115 {
116 case -1:
117 return -1;
118 case -2:
119 if (length >= 2)
120 return map((bytes[0] << 8) | bytes[1]);
121 else
122 return -2;
123 default:
124 return n;
125 }
126}
127
128
129int DoubleByteEncoding::sequenceLength(const unsigned char* bytes, int length) const

Callers 2

testSingleByteMethod · 0.45
testDoubleByteMethod · 0.45

Calls 1

mapClass · 0.50

Tested by 2

testSingleByteMethod · 0.36
testDoubleByteMethod · 0.36