On 04/07/2011 02:31 PM, Guilhem Bichot wrote:
> Jorgen Loland a écrit, Le 06.04.2011 11:09:
>> On 04/05/2011 11:19 AM, Guilhem Bichot wrote:
>>>> + SEL_ARG *keypart_root,
>>> can this one be a const pointer?
>> It will not be modified, but unfortunately it cannot be not declared const.
>> Declaring it const would require SEL_ARG::first() to be const as well, in turn
>> requiring next_arg to be const * const. Because nothing is encapsulated,
>> first() cannot return a const * const.
> ok, I remember we had the same discussion for another function which was also
> returning "this" and could not be const.
> Let's forget about it. Could you please just add this then:
> @@ -12427,7 +12427,7 @@
> // Navigate to first interval in red-black tree
> const KEY_PART_INFO *cur_key_part= key_part + keypart_root->part;
> - SEL_ARG *keypart_range= keypart_root->first();
> + const SEL_ARG *keypart_range= keypart_root->first();
Jørgen Løland | Senior Software Engineer | +47 73842138