Re: [PUSHED][PATCH] convert table.hxx use in editeng/inc/editeng/forbiddencharacterstable.hxx

2012-02-16 Thread Kohei Yoshida
On Thu, 2012-02-16 at 10:48 +0400, Ivan Timofeev wrote: Whoa, I seem to be too naive for patch-reviewing... Is it a safe code? pForbiddenCharacters = maMap[ nLanguage ]; return pForbiddenCharacters; Yeah I don't see anything wrong with it. Will pForbiddenCharacters point to

Re: [PUSHED][PATCH] convert table.hxx use in editeng/inc/editeng/forbiddencharacterstable.hxx

2012-02-16 Thread Michael Meeks
On Thu, 2012-02-16 at 15:20 -0500, Kohei Yoshida wrote: Is it a safe code? pForbiddenCharacters = maMap[ nLanguage ]; return pForbiddenCharacters; ... So, in theory, taking the address of a returned object which itself is a reference to the instance stored in the container is

Re: [PUSHED][PATCH] convert table.hxx use in editeng/inc/editeng/forbiddencharacterstable.hxx

2012-02-16 Thread Kohei Yoshida
On Thu, Feb 16, 2012 at 4:01 PM, Michael Meeks michael.me...@suse.com wrote: On Thu, 2012-02-16 at 15:20 -0500, Kohei Yoshida wrote: Is it a safe code?      pForbiddenCharacters = maMap[ nLanguage ];      return pForbiddenCharacters; ... So, in theory, taking the address of a returned

Re: [PUSHED][PATCH] convert table.hxx use in editeng/inc/editeng/forbiddencharacterstable.hxx

2012-02-16 Thread Ivan Timofeev
On 17.02.2012 00:20, Kohei Yoshida wrote: As far as I know those STL methods that return its element are guaranteed to return a reference to the stored instance, not its copy. Ah, great, I was not sure of that. On 17.02.2012 01:01, Michael Meeks wrote: I guess :-) I imagine the real

Re: [PATCH] convert table.hxx use in editeng/inc/editeng/forbiddencharacterstable.hxx

2012-02-15 Thread Noel Grandin
Hi Updated patch implementing Ivan's suggestion. Passes make and make check. Convert tools/table.hxx usage in editeng/inc/editeng/forbiddencharacterstable.hxx to std::map Contributed under LGPLv3+ / MPL 1.1 or later. (And my license statement is on file in the wiki) Regards, Noel. On

Re: [PUSHED][PATCH] convert table.hxx use in editeng/inc/editeng/forbiddencharacterstable.hxx

2012-02-15 Thread Ivan Timofeev
Hi Noel, On 15.02.2012 19:01, Noel Grandin wrote: Updated patch implementing Ivan's suggestion. Passes make and make check. Convert tools/table.hxx usage in editeng/inc/editeng/forbiddencharacterstable.hxx to std::map Looks good to me, pushed (without GetCharInfo - it was unused):

Re: [PUSHED][PATCH] convert table.hxx use in editeng/inc/editeng/forbiddencharacterstable.hxx

2012-02-15 Thread Ivan Timofeev
Whoa, I seem to be too naive for patch-reviewing... Is it a safe code? pForbiddenCharacters = maMap[ nLanguage ]; return pForbiddenCharacters; Will pForbiddenCharacters point to the deleted object, after the return? Terribly sorry for such a question... Regards, Ivan

Re: [PATCH] convert table.hxx use in editeng/inc/editeng/forbiddencharacterstable.hxx

2012-02-12 Thread Ivan Timofeev
Hi Noel, On 10.02.2012 10:56, Noel Grandin wrote: Convert tools/table.hxx usage in editeng/inc/editeng/forbiddencharacterstable.hxx to boost::ptr_map ForbiddenCharactersInfo is simple wrapper for ForbiddenCharacters. It only adds the bTemporary flag. But bTemporary seems to be write-only,

Re: [PATCH] convert table.hxx use in editeng/inc/editeng/forbiddencharacterstable.hxx

2012-02-12 Thread Noel Grandin
Sure, sounds like a good idea, Will do. -- Noel grandin On Sun, Feb 12, 2012 at 12:08, Ivan Timofeev timofeev@gmail.com wrote: Hi Noel, On 10.02.2012 10:56, Noel Grandin wrote: Convert tools/table.hxx usage in editeng/inc/editeng/forbiddencharacterstable.hxx to boost::ptr_map

[PATCH] convert table.hxx use in editeng/inc/editeng/forbiddencharacterstable.hxx

2012-02-09 Thread Noel Grandin
Hi Convert tools/table.hxx usage in editeng/inc/editeng/forbiddencharacterstable.hxx to boost::ptr_map Contributed under LGPLv3+ / MPL 1.1 or later. (And my license statement is on file in the wiki) Regards, Noel Grandin Disclaimer: http://www.peralex.com/disclaimer.html diff --git