Hi, I have submitted a patch for review:
https://gerrit.libreoffice.org/2523 To pull it, you can do: git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/23/2523/1 Simplify and speed-up logic for copying data Change-Id: I790ef30075d74c6bd7a049750dfb555d36d77542 Signed-off-by: jailletc36 <christophe.jail...@wanadoo.fr> --- M autodoc/source/parser_i/tokens/tkpstam2.cxx 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/autodoc/source/parser_i/tokens/tkpstam2.cxx b/autodoc/source/parser_i/tokens/tkpstam2.cxx index 0cb3519..3139a26 100644 --- a/autodoc/source/parser_i/tokens/tkpstam2.cxx +++ b/autodoc/source/parser_i/tokens/tkpstam2.cxx @@ -117,16 +117,10 @@ 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+i, 0, (nNewSize-nNrofStati) * sizeof(StmStatu2*) ); delete [] pStati; pStati = pNewStati; -- To view, visit https://gerrit.libreoffice.org/2523 To unsubscribe, visit https://gerrit.libreoffice.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I790ef30075d74c6bd7a049750dfb555d36d77542 Gerrit-PatchSet: 1 Gerrit-Project: core Gerrit-Branch: master Gerrit-Owner: Christophe JAILLET <christophe.jail...@wanadoo.fr> _______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice