From: Jorgen Loland Date: April 7 2011 1:29pm Subject: Re: bzr commit into mysql-trunk branch (jorgen.loland:3285) List-Archive: http://lists.mysql.com/commits/134938 Message-Id: <4D9DBC2B.3020703@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Done 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 Oracle MySQL Trondheim, Norway