From 8358813204bdf0f8bbfbbc312a1c97f0894f9318 Mon Sep 17 00:00:00 2001 From: Robin Jadoul Date: Fri, 20 Jan 2017 13:47:19 +0100 Subject: [PATCH] Better grammar building in tests/lr1_only.cpp --- tests/lr1_only.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/lr1_only.cpp b/tests/lr1_only.cpp index 74302ae..ed08e99 100644 --- a/tests/lr1_only.cpp +++ b/tests/lr1_only.cpp @@ -23,10 +23,8 @@ TEST(lr1, only) { {"a", {"A"}}, {"b", {"A"}} })) { - auto r = std::make_shared(); - r->head = p.first; - r->tail = p.second; - grammar.rules.emplace_back(std::move(r)); + + grammar.rules.emplace_back(std::make_shared(p.first, p.second)); } {