diff options
author | Roland Reichwein <mail@reichwein.it> | 2020-11-21 15:19:45 +0100 |
---|---|---|
committer | Roland Reichwein <mail@reichwein.it> | 2020-11-21 15:19:45 +0100 |
commit | 7edbd99775416a32c88acf8e9379518436905f02 (patch) | |
tree | 6356edb79f846df4aa2f6a8a5ecfeef4e651bcc0 /cppbnf.cpp | |
parent | 7250bbe5ae2d2ee6b0334bc462aab73f7d8dac0e (diff) |
Support gcc 10 and clang 11
Diffstat (limited to 'cppbnf.cpp')
-rw-r--r-- | cppbnf.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -7,9 +7,6 @@ #include <boost/algorithm/string/predicate.hpp> -#include <gtest/gtest.h> -#include <gmock/gmock.h> - using namespace std::string_literals; namespace { @@ -123,7 +120,7 @@ namespace { void resolveOptional(std::vector<std::vector<std::string>>& lists) { - for (int i = 0; i < lists.size(); i++) { + for (size_t i = 0; i < lists.size(); i++) { if (containsOptional(lists[i])) { auto insertList = resolveOptional(lists[i]); // replace element i with new list @@ -150,7 +147,7 @@ namespace { // vectorize terminal symbols for (auto& [symbol, lists] : bnf) { for (auto& list : lists) { - for (int i = 0; i < list.size(); i++) { + for (size_t i = 0; i < list.size(); i++) { if (list[i].size() > 1 && isTerminal(bnf, list[i])) { auto newList = vectorize(list[i]); list.erase(list.begin() + i); |