From a11084e760f3ddf4e95e9aeabada3c3e66810a99 Mon Sep 17 00:00:00 2001 From: Aina Niemetz Date: Wed, 9 Dec 2020 14:13:05 -0800 Subject: [PATCH] Fix compiler warnings. (#5644) --- src/theory/strings/sequences_rewriter.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/theory/strings/sequences_rewriter.cpp b/src/theory/strings/sequences_rewriter.cpp index 1382ab0f9..2a30727ba 100644 --- a/src/theory/strings/sequences_rewriter.cpp +++ b/src/theory/strings/sequences_rewriter.cpp @@ -1517,7 +1517,6 @@ RewriteResponse SequencesRewriter::preRewrite(TNode node) Node SequencesRewriter::rewriteSeqNth(Node node) { Assert(node.getKind() == SEQ_NTH || node.getKind() == SEQ_NTH_TOTAL); - Node ret; Node s = node[0]; Node i = node[1]; if (s.isConst() && i.isConst()) @@ -1527,7 +1526,7 @@ Node SequencesRewriter::rewriteSeqNth(Node node) if (pos < len) { std::vector elements = s.getConst().getVec(); - ret = elements[pos]; + const Node& ret = elements[pos]; return returnRewrite(node, ret, Rewrite::SEQ_NTH_EVAL); } else if (node.getKind() == SEQ_NTH_TOTAL) -- 2.30.2