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.jaillet@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.jaillet@wanadoo.fr>
Context
- [PATCH] Simplify and speed-up logic for copying data · Christophe JAILLET (via Code Review)
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.