From: Aina Niemetz Date: Wed, 9 Dec 2020 22:13:05 +0000 (-0800) Subject: Fix compiler warnings. (#5644) X-Git-Tag: cvc5-1.0.0~2462 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a11084e760f3ddf4e95e9aeabada3c3e66810a99;p=cvc5.git Fix compiler warnings. (#5644) --- 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)