MCPcopy Create free account
hub / github.com/Tripwire/tripwire-open-source / DecodeChar

Method DecodeChar

src/util/stringencoder.cpp:69–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67}
68
69TCHAR cCharEncoder::DecodeChar(TSTRING::const_iterator& i, TSTRING::const_iterator& end)
70{
71 ASSERT(i != end);
72
73 if (*i == mchEncodeMe)
74 {
75 ASSERT(false);
76 return _T('\0');
77 }
78 else if (*i == mchEncoded1)
79 {
80 if (++i == end)
81 {
82 ASSERT(false);
83 return _T('\0');
84 }
85 else
86 {
87 if (*i == mchEncoded1)
88 return mchEncoded1;
89 else if (*i == mchEncoded2)
90 return mchEncodeMe;
91 else
92 {
93 ASSERT(false);
94 return _T('\0');
95 }
96 }
97 }
98 else
99 return (*i);
100}
101
102//////////////////////////////////////////////////////////////////////////////
103// cStringEncoder

Callers 1

stringencoder.cppFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected