summaryrefslogtreecommitdiffhomepage
path: root/cppbnf.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cppbnf.cpp')
-rw-r--r--cppbnf.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/cppbnf.cpp b/cppbnf.cpp
index 7e8ec15..3fddb66 100644
--- a/cppbnf.cpp
+++ b/cppbnf.cpp
@@ -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);