Refactorization: Reduced stack usage of givenACodeSampleToTokenize

Merged from LCppC.
This commit is contained in:
PKEuS 2021-02-18 16:28:04 +01:00 committed by Daniel Marjamäki
parent 4678a9cb45
commit acafdb655c
2 changed files with 4 additions and 2 deletions

View File

@ -16,10 +16,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "testutils.h"
#include "testsuite.h" #include "testsuite.h"
#include "utils.h" #include "utils.h"
const Settings givenACodeSampleToTokenize::settings;
class TestUtils : public TestFixture { class TestUtils : public TestFixture {
public: public:
TestUtils() : TestFixture("TestUtils") { TestUtils() : TestFixture("TestUtils") {

View File

@ -26,8 +26,8 @@ class Token;
class givenACodeSampleToTokenize { class givenACodeSampleToTokenize {
private: private:
Settings settings;
Tokenizer tokenizer; Tokenizer tokenizer;
static const Settings settings;
public: public:
explicit givenACodeSampleToTokenize(const char sample[], bool createOnly = false, bool cpp = true) explicit givenACodeSampleToTokenize(const char sample[], bool createOnly = false, bool cpp = true)