Angus Leeming <[EMAIL PROTECTED]> writes: | Angus Leeming wrote: > >> MSVC complains about line 797 of rowpainter.C: >> if (vi.p2 < text->paragraphs().size() - 1) { >> >> \lyx\lyx-devel\src\rowpainter.C(797) : warning C4018: '<' : >> signed/unsigned mismatch >> >> vi.p2 has type lyx::pit_type (ptrdiff_t). >> text->paragraphs().size() has type std::size_t >> >> Given that (text->paragraphs().size() == 0) is not unreasonable (I don't >> know if it can happen ever, but that's a secondary issue), I think that >> the correct code should be: >> if (vi.p2 < lyx::pit_type(text->paragraphs().size()) - 1) { >> >> Agree? > | Silence?
I kindo agreed so I kept quiet. | Anyway, here's the patch. I'll commit this as it seems to me to | squash a genuine bug. The only thing that can be a potential problem in some distant future is that by doing this we effectevely(sic) half the numbers of available paragraphs... but since it is in the billions anyway it probably doesn't matter. -- Lgb