diff options
author | sgeerken <devnull@localhost> | 2012-07-11 19:04:12 +0200 |
---|---|---|
committer | sgeerken <devnull@localhost> | 2012-07-11 19:04:12 +0200 |
commit | fa1c054f17f6c71a5314e4c3e638c15aa33ec09c (patch) | |
tree | 31d8b687d2ff7843b8b5aab0d473116d4df32184 /lout/misc.hh | |
parent | 3cef8224ed1a1a3267adf5a5d3f1bdcf4c1b5eca (diff) |
NotSoSimpleVector is now working in the intended way.
Diffstat (limited to 'lout/misc.hh')
-rw-r--r-- | lout/misc.hh | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lout/misc.hh b/lout/misc.hh index f4d0f8de..f877c879 100644 --- a/lout/misc.hh +++ b/lout/misc.hh @@ -327,10 +327,12 @@ private: { if (startExtra != -1) { numMain += numExtra; + resizeMain (); memmove (arrayMain + startExtra + numExtra, arrayMain + startExtra, (numMain - (startExtra + numExtra)) * sizeof (T)); - memmove (arrayMain + startExtra, arrayExtra1, numExtra); + memmove (arrayMain + startExtra, arrayExtra1, numExtra * sizeof (T)); startExtra = -1; + numExtra = 0; } } @@ -387,10 +389,10 @@ public: assert (numInsert >= 0); // The following lines are a simple (but inefficient) replacement. - setSize (numMain + numInsert); - memmove (arrayMain + index + numInsert, arrayMain + index, - (numMain - index - numInsert) * sizeof (T)); - return; + //setSize (numMain + numInsert); + //memmove (arrayMain + index + numInsert, arrayMain + index, + // (numMain - index - numInsert) * sizeof (T)); + //return; if (this->startExtra == -1) { // simple case |