On Tue, Feb 15, 2005 at 10:31:45AM +0000, 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?
I prefer if (vi.p2 + 1 < text->paragraphs().size()) in such cases, but either solution will do. Andre'