Skip to content

Commit a6124ee

Browse files
committed
Revert "Refactor code to build with VS2010"
This reverts commit 2957412.
1 parent 5cba0f6 commit a6124ee

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

main.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,16 @@ int main(int argc, char **argv) {
5454
simplecpp::TokenList rawtokens(f,files,filename,&outputList);
5555
rawtokens.removeComments();
5656
std::map<std::string, simplecpp::TokenList*> included = simplecpp::load(rawtokens, files, dui, &outputList);
57-
for (std::map<std::string, simplecpp::TokenList *>::const_iterator i = included.begin(); i!=included.end(); ++i)
58-
i->second->removeComments();
57+
for (std::pair<std::string, simplecpp::TokenList *> i : included)
58+
i.second->removeComments();
5959
simplecpp::TokenList output(files);
6060
simplecpp::preprocess(output, rawtokens, files, included, dui, &outputList);
6161

6262
// Output
6363
std::cout << output.stringify() << std::endl;
64-
for (simplecpp::OutputList::const_iterator output = outputList.begin(); output!=outputList.end(); ++output) {
65-
std::cerr << output->location.file() << ':' << output->location.line << ": ";
66-
switch (output->type) {
64+
for (const simplecpp::Output &output : outputList) {
65+
std::cerr << output.location.file() << ':' << output.location.line << ": ";
66+
switch (output.type) {
6767
case simplecpp::Output::ERROR:
6868
std::cerr << "#error: ";
6969
break;
@@ -83,7 +83,7 @@ int main(int argc, char **argv) {
8383
std::cerr << "portability: ";
8484
break;
8585
}
86-
std::cerr << output->msg << std::endl;
86+
std::cerr << output.msg << std::endl;
8787
}
8888

8989
// cleanup included tokenlists

0 commit comments

Comments
 (0)