From ca9d3e6e00ec452701d9d3b7e909eff61799f739 Mon Sep 17 00:00:00 2001 From: Jade Lovelace Date: Thu, 1 Aug 2024 13:42:14 -0700 Subject: tree-wide: fix various lint warnings Change-Id: I0fc80718eb7e02d84cc4b5d5deec4c0f41116134 --- src/libexpr/parser/parser.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/libexpr/parser/parser.cc') diff --git a/src/libexpr/parser/parser.cc b/src/libexpr/parser/parser.cc index a00586c36..b7a105fe7 100644 --- a/src/libexpr/parser/parser.cc +++ b/src/libexpr/parser/parser.cc @@ -12,7 +12,6 @@ #include "state.hh" #include -#include #include // flip this define when doing parser development to enable some g checks. @@ -254,7 +253,8 @@ struct AttrState : SubexprState { std::vector attrs; - void pushAttr(auto && attr, PosIdx) { attrs.emplace_back(std::move(attr)); } + template + void pushAttr(T && attr, PosIdx) { attrs.emplace_back(std::forward(attr)); } }; template<> struct BuildAST { @@ -290,7 +290,8 @@ struct InheritState : SubexprState { std::unique_ptr from; PosIdx fromPos; - void pushAttr(auto && attr, PosIdx pos) { attrs.emplace_back(std::move(attr), pos); } + template + void pushAttr(T && attr, PosIdx pos) { attrs.emplace_back(std::forward(attr), pos); } }; template<> struct BuildAST { -- cgit v1.2.3