Asger Ottar Alstrup wrote:
Abdelrazak Younes wrote:
Please review this patch; I am not quite sure these are the correct
fixes for the MSVC warning. But it seems to parse math correctly.
>
-CatCode theCatcode[256];
+CatCode theCatcode[sizeof(lyx::char_type)];
Hm, is sizeof(lyx::char_type) not 4?
Oups, of course yes you're right.
I think you mean
1 << (sizeof(lyx::char_type) * 8)
Well maybe we could limit that to the maximum number of unicode char
(2^21?). No, that's too much also I guess. Maybe a hash table...
and then it becomes obvious that this is probably not such a great idea:
Allocating 32 MB for this table where you only fill in the first 256
slots seems a little excessive.
Indeed, but this is a hint that something must be done WTR math parsing
and unicode.
Thanks,
Abdel.