diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-29 12:34:52 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-30 08:30:17 +0200 |
commit | cb2c7428f68d2c07f5e97ae4b42fee7c43e709a8 (patch) | |
tree | 2a031e4245d05acfd22584f3024223efad082109 /idlc/inc | |
parent | e040d8defb774255e083825863641493f4c7d9ff (diff) |
use std::vector in AstStack
instead of a hand-coded equivalent. Note that I can't use
std::unique_ptr, because the parsing code appears to just randomly leak
AstScope
Change-Id: Idc56dfe1f084db55c9d5a7558ac44ddab53b98e3
Reviewed-on: https://gerrit.libreoffice.org/59771
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'idlc/inc')
-rw-r--r-- | idlc/inc/aststack.hxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/idlc/inc/aststack.hxx b/idlc/inc/aststack.hxx index fa13d7affd92..b3f4cda695fd 100644 --- a/idlc/inc/aststack.hxx +++ b/idlc/inc/aststack.hxx @@ -20,6 +20,7 @@ #define INCLUDED_IDLC_INC_ASTSTACK_HXX #include <sal/types.h> +#include <vector> class AstScope; @@ -29,7 +30,7 @@ public: AstStack(); ~AstStack(); - sal_uInt32 depth() const { return m_top;} + sal_uInt32 depth() const { return m_stack.size();} AstScope* top(); AstScope* bottom(); AstScope* nextToTop(); @@ -39,9 +40,7 @@ public: void clear(); private: - AstScope** m_stack; - sal_uInt32 m_size; - sal_uInt32 m_top; + std::vector<AstScope*> m_stack; }; #endif // INCLUDED_IDLC_INC_ASTSTACK_HXX |