diff options
author | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2015-10-03 10:01:01 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2015-10-03 10:01:51 +0200 |
commit | bf3dd18cf86fd45882b813d08c3df5d7cd097246 (patch) | |
tree | f476bf58672170dafa19244271281743df241175 /include | |
parent | 329496c1f75f97d2e6119ceb214a2ea1fbadb17a (diff) |
no need to allocate that vector on the heap
This seems to give about 10% performance improvements in some calc cell
calculations.
Change-Id: Ibd91558b3c107e4c8e1401345c9332f97645453e
Diffstat (limited to 'include')
-rw-r--r-- | include/formula/tokenarray.hxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/formula/tokenarray.hxx b/include/formula/tokenarray.hxx index 7a745b6594ff..0f303ac3a1e3 100644 --- a/include/formula/tokenarray.hxx +++ b/include/formula/tokenarray.hxx @@ -330,7 +330,7 @@ class FORMULA_DLLPUBLIC FormulaTokenIterator Item(const FormulaTokenArray* arr, short pc, short stop); }; - std::vector<Item> *maStack; + std::vector<Item> maStack; public: FormulaTokenIterator( const FormulaTokenArray& ); @@ -339,8 +339,8 @@ public: const FormulaToken* Next(); const FormulaToken* PeekNextOperator(); bool IsEndOfPath() const; /// if a jump or subroutine path is done - bool HasStacked() const { return maStack->size() > 1; } - short GetPC() const { return maStack->back().nPC; } + bool HasStacked() const { return maStack.size() > 1; } + short GetPC() const { return maStack.back().nPC; } /** Jump or subroutine call. Program counter values will be incremented before code is executed => |