Forgive my ignorance but I don't see what type of casting I
could do to prevent this sign extension. I tried:
WChar w;
Char c;
w = ( WChar ) c;
to no avail, 0xEC became 0xFFEC. So in the end I added:
w = 0x00FF;
Char is a 'signed char' - so, naturally, it'll think about
the sign bit
Ken Krugler a écrit :
Running the Gremlins on my application, I get a TextMgr.cpp, Line:727,
Sign-extended char passed to TxtCharAttr warning because the Gremlin
wrote a 236 (EC) character into a field onto which I later perform, for
each character, a TxtGlueCharIsAlNum call, which in turn,
Forgive my ignorance but I don't see what type of casting I could do to
prevent this sign extension. I tried:
WCharw;
Charc;
w = ( WChar ) c;
to no avail, 0xEC became 0xFFEC. So in the end I added:
w = 0x00FF;
w = (WChar)(unsigned char)c;
will do it nicely.
--
Ben Combee
Running the Gremlins on my application, I get a TextMgr.cpp, Line:727,
Sign-extended char passed to TxtCharAttr warning because the Gremlin
wrote a 236 (EC) character into a field onto which I later perform, for
each character, a TxtGlueCharIsAlNum call, which in turn, calls
TxtCharAttr. The OS
Running the Gremlins on my application, I get a TextMgr.cpp, Line:727,
Sign-extended char passed to TxtCharAttr warning because the Gremlin
wrote a 236 (EC) character into a field onto which I later perform, for
each character, a TxtGlueCharIsAlNum call, which in turn, calls
TxtCharAttr. The OS