From 1f506ee2422508a9c4f55aa7ec0eb67b3805750f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 29 Mar 2026 03:19:57 +0000 Subject: [PATCH] Fix apply_permutation to take perm by const reference Agent-Logs-Url: https://github.com/Z3Prover/z3/sessions/f81ba8ad-2875-4fcc-ba91-d502905756be Co-authored-by: levnach <5377127+levnach@users.noreply.github.com> --- src/nlsat/levelwise.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nlsat/levelwise.cpp b/src/nlsat/levelwise.cpp index 6e02eccd5..e085d6173 100644 --- a/src/nlsat/levelwise.cpp +++ b/src/nlsat/levelwise.cpp @@ -958,7 +958,7 @@ namespace nlsat { // Apply a permutation to a range of root_functions using swap cycles, // avoiding the bulk anum allocations that std::sort's move operations cause. - void apply_permutation(std_vector& rfs, unsigned offset, std_vector& perm) { + void apply_permutation(std_vector& rfs, unsigned offset, std_vector const& perm) { std_vector done(perm.size(), false); for (unsigned i = 0; i < perm.size(); ++i) { if (done[i] || perm[i] == i)