[Libreoffice] signed/unsigned comparison (was: [PATCH] Replace SvULongs with vector and code clean up part 1)
Lubos Lunak
l.lunak at suse.cz
Tue Aug 9 08:15:33 PDT 2011
On Tuesday 09 of August 2011, Stephan Bergmann wrote:
> On Aug 9, 2011, at 3:02 PM, Lubos Lunak wrote:
> > Too bad usage of STL drags in these problems, but that's not a problem
> > that couldn't be solved.
>
> How?
namespace lostd // or just no namespace at all, any other 'list' class is
unlikely
{
template< ... >
class list : public ::std::list< ... >
{
...
int size() const { return ::std::list< ... >::size(); } // plus possibly
checks here, but somehow doubt there are many cases, if any, where one would
have a list with more than 2E9 items
...
};
This class is technically still also std::list, so it should be a drop-in
replacement for all cases. And IMO a much nicer solution than
people "randomly" adding casts all over the codebase.
--
Lubos Lunak
l.lunak at suse.cz
More information about the LibreOffice
mailing list