summaryrefslogtreecommitdiff
path: root/autodoc
diff options
context:
space:
mode:
authorChris <chris.sherlock79@gmail.com>2013-03-08 21:42:45 +1100
committerStephan Bergmann <sbergman@redhat.com>2013-03-08 11:57:15 +0000
commitd16ec6a1802e54890dac4df7403cd6ddcb81bcf3 (patch)
tree79f367dc370bfa8a1d13085d87dd9daeae0d0c61 /autodoc
parent2f3e1c77b2e2304f9a718d35f6b12daef261e2c1 (diff)
Simplify and speed-up logic for copying data
Change-Id: I790ef30075d74c6bd7a049750dfb555d36d77542 Signed-off-by: jailletc36 <christophe.jaillet@wanadoo.fr> Reviewed-on: https://gerrit.libreoffice.org/2523 Reviewed-by: Jørgen Nystad <jorgenys@gmail.com> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'autodoc')
-rw-r--r--autodoc/source/parser_i/tokens/tkpstam2.cxx10
1 files changed, 2 insertions, 8 deletions
diff --git a/autodoc/source/parser_i/tokens/tkpstam2.cxx b/autodoc/source/parser_i/tokens/tkpstam2.cxx
index 0cb35194a679..b9594b398737 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;