]> git.saurik.com Git - bison.git/blobdiff - data/stack.hh
c++: reserve 200 slots in the parser's stack
[bison.git] / data / stack.hh
index e7ff04058297d9cf2d1063e3180558fb33943674..a56e6c741d49d25737a330a13abd4bfbd7705e01 100644 (file)
@@ -32,12 +32,12 @@ m4_define([b4_stack_define],
     stack ()
       : seq_ ()
     {
+      seq_.reserve (200);
     }
 
     stack (unsigned int n)
       : seq_ (n)
-    {
-    }
+    {}
 
     inline
     T&
@@ -114,8 +114,7 @@ m4_define([b4_stack_define],
     slice (const S& stack, unsigned int range)
       : stack_ (stack)
       , range_ (range)
-    {
-    }
+    {}
 
     inline
     const T&