Moved CheckAssert::assertWithSideEffects to normal checking

This commit is contained in:
Daniel Marjamäki 2019-03-09 16:50:50 +01:00
parent 7caa6628d5
commit 38d5712aaa
2 changed files with 12 additions and 4 deletions

View File

@ -49,9 +49,17 @@ public:
: Check(myName(), tokenizer, settings, errorLogger) { : Check(myName(), tokenizer, settings, errorLogger) {
} }
/** run checks, the token list is not simplified */
virtual void runChecks(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger) OVERRIDE {
CheckAssert checkAssert(tokenizer, settings, errorLogger);
checkAssert.assertWithSideEffects();
}
virtual void runSimplifiedChecks(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger) OVERRIDE { virtual void runSimplifiedChecks(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger) OVERRIDE {
CheckAssert check(tokenizer, settings, errorLogger); (void)tokenizer;
check.assertWithSideEffects(); (void)settings;
(void)errorLogger;
} }
void assertWithSideEffects(); void assertWithSideEffects();

View File

@ -40,8 +40,8 @@ private:
tokenizer.tokenize(istr, filename); tokenizer.tokenize(istr, filename);
// Check.. // Check..
CheckAssert checkAssert(&tokenizer, &settings, this); CheckAssert checkAssert;
checkAssert.runSimplifiedChecks(&tokenizer, &settings, this); checkAssert.runChecks(&tokenizer, &settings, this);
} }
void run() OVERRIDE { void run() OVERRIDE {