Hi Jason,
+ ME_InsertTextFromCursor(editor, 0, &endlv10[0], 2, style);
you want to use endlv10 instead, i.e.:
+ ME_InsertTextFromCursor(editor, 0, endlv10, 2, style); --Juan
2012/1/18 Juan Lang juan.lang@gmail.com
Hi Jason,
ME_InsertTextFromCursor(editor, 0, &endlv10[0], 2, style);
you want to use endlv10 instead, i.e.:
ME_InsertTextFromCursor(editor, 0, endlv10, 2, style);
--Juan
This was deliberate - I did that originally and I got a compile warning as one is const WCHAR * and one is const WCHAR[2] (Not sure if that error was from a MSVC windows or Linux compile, but I was trying to avoid it, and a typecast was a bit pointless as the above is accurate as well, isnt it?)
Jason
This was deliberate - I did that originally and I got a compile warning as one is const WCHAR * and one is const WCHAR[2] (Not sure if that error was from a MSVC windows or Linux compile, but I was trying to avoid it, and a typecast was a bit pointless as the above is accurate as well, isnt it?)
You could declare it non-const. That's often what we end up doing in the tests, that or casting away the const. --Juan
This was deliberate - I did that originally and I got a compile warning
as
one is const WCHAR * and one is const WCHAR[2] (Not sure if that error
was
from a MSVC windows or Linux compile, but I was trying to avoid it, and a typecast was a bit pointless as the above is accurate as well, isnt it?)
You could declare it non-const. That's often what we end up doing in the tests, that or casting away the const.
Whats the difference between a typecast and &var[0]?
Jason
Whats the difference between a typecast and &var[0]?
I wasn't advocating for a typecast, merely admitting that we use them from time to time.
What's the compile warning you're actually seeing on gcc? I don't think we care what warnings are produced in MSVC. --Juan
(Apologies, the building on windows was the tests not the main richedit... as I built the tests with high warnings to try to minimize the pain when I got to Linux)
Ok... I agree with you, and worked out why I was doing it and user error comes in...! I was copying the line above and using &endlv10 which is 'obviously' wrong as endlv10 is now an array rather than a character compared to endl...
'll resend, and thanks for working this through with me!
Jason
On Thu, Jan 19, 2012 at 08:22:11PM +0000, The Edmeades wrote:
I'll resend, and thanks for working this through with me!
Before you resend, please fix your mail client to put your real name in the From: header, as I believe you are named Jason and not The :)
Andrew