File tree Expand file tree Collapse file tree 5 files changed +9
-9
lines changed
Expand file tree Collapse file tree 5 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ class TestBoost : public TestFixture {
3535 TEST_CASE (BoostForeachContainerModification)
3636 }
3737
38- void check (const std::string & code) {
38+ void check (const char code[] ) {
3939 // Clear the error buffer..
4040 errout.str (" " );
4141
@@ -45,7 +45,7 @@ class TestBoost : public TestFixture {
4545
4646 // Tokenize..
4747 Tokenizer tokenizer (&settings, this );
48- std::istringstream istr (code. c_str () );
48+ std::istringstream istr (code);
4949 tokenizer.tokenize (istr, " test.cpp" );
5050 tokenizer.simplifyTokenList ();
5151
Original file line number Diff line number Diff line change 3030#include < list>
3131#include < string>
3232
33- // use tinyxml with STL
34- #include < tinyxml.h>
35-
3633extern std::ostringstream errout;
3734extern std::ostringstream output;
3835
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ class TestExceptionSafety : public TestFixture {
4444 TEST_CASE (catchExceptionByValue);
4545 }
4646
47- void check (const std::string & code, bool inconclusive = false ) {
47+ void check (const char code[] , bool inconclusive = false ) {
4848 // Clear the error buffer..
4949 errout.str (" " );
5050
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ class TestInternal : public TestFixture {
4141 TEST_CASE (internalError)
4242 }
4343
44- void check (const std::string & code) {
44+ void check (const char code[] ) {
4545 // Clear the error buffer..
4646 errout.str (" " );
4747
@@ -50,7 +50,7 @@ class TestInternal : public TestFixture {
5050
5151 // Tokenize..
5252 Tokenizer tokenizer (&settings, this );
53- std::istringstream istr (code. c_str () );
53+ std::istringstream istr (code);
5454 tokenizer.tokenize (istr, " test.cpp" );
5555 tokenizer.simplifyTokenList ();
5656
Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ class TestStl : public TestFixture {
118118
119119 }
120120
121- void check (const std::string & code, const bool inconclusive=false ) {
121+ void check (const char code[] , const bool inconclusive=false ) {
122122 // Clear the error buffer..
123123 errout.str (" " );
124124
@@ -137,6 +137,9 @@ class TestStl : public TestFixture {
137137 CheckStl checkStl;
138138 checkStl.runSimplifiedChecks (&tokenizer, &settings, this );
139139 }
140+ void check (const std::string &code, const bool inconclusive=false ) {
141+ check (code.c_str (), inconclusive);
142+ }
140143
141144
142145 void iterator1 () {
You can’t perform that action at this time.
0 commit comments