[Libreoffice-commits] core.git: autodoc/source
Chris
chris.sherlock79 at gmail.com
Fri Mar 8 03:57:35 PST 2013
autodoc/source/parser_i/tokens/tkpstam2.cxx | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
New commits:
commit d16ec6a1802e54890dac4df7403cd6ddcb81bcf3
Author: Chris <chris.sherlock79 at gmail.com>
Date: Fri Mar 8 21:42:45 2013 +1100
Simplify and speed-up logic for copying data
Change-Id: I790ef30075d74c6bd7a049750dfb555d36d77542
Signed-off-by: jailletc36 <christophe.jaillet at wanadoo.fr>
Reviewed-on: https://gerrit.libreoffice.org/2523
Reviewed-by: Jørgen Nystad <jorgenys at gmail.com>
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
Tested-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/autodoc/source/parser_i/tokens/tkpstam2.cxx b/autodoc/source/parser_i/tokens/tkpstam2.cxx
index 0cb3519..b9594b3 100644
--- a/autodoc/source/parser_i/tokens/tkpstam2.cxx
+++ b/autodoc/source/parser_i/tokens/tkpstam2.cxx
@@ -117,16 +117,10 @@ void
StateMachin2::ResizeStati()
{
intt nNewSize = nStatiSpace + C_nStatuslistResizeValue;
- intt i = 0;
StatusList pNewStati = new StmStatu2*[nNewSize];
- for ( ; i < nNrofStati; i++)
- {
- pNewStati[i] = pStati[i];
- }
- memset( pNewStati+i,
- 0,
- (nNewSize-i) * sizeof(StmStatu2*) );
+ memcpy( pNewStati, pStati, nNrofStati * sizeof(StmStatu2*) );
+ memset( pNewStati+nNrofStati, 0, (nNewSize-nNrofStati) * sizeof(StmStatu2*) );
delete [] pStati;
pStati = pNewStati;
More information about the Libreoffice-commits
mailing list