Subject: Re: crasher fix
From: Mike Nordell (tamlin@algonet.se)
Date: Tue May 15 2001 - 02:48:37 CDT
Patrick Lam wrote:
> This following patch seems to work, partially reverting a change by abela.
>
> However, as I am no C++ expert and I'm not quite sure what the semantics
> of a const function are, I will not check in this change myself. Could
> someone figure out why it seems to work?
> RCS file: /cvsroot/abi/src/af/util/xp/ut_vector.h,v
>
> - void* operator[](UT_uint32 i) const;
This was an error. A const function allowing write acess to its internal
data.
> + const void* operator[](UT_uint32 i) const;
This is correct.
> void* getFirstItem() const;
> void* getLastItem() const;
These are also errors. Either they should be non-const, or they should
return const pointers.
/Mike
This archive was generated by hypermail 2b25 : Sat May 26 2001 - 03:51:04 CDT