diff --git a/src/stim/util_top/reference_sample_tree.cc b/src/stim/util_top/reference_sample_tree.cc index c6c0f455..bb8764aa 100644 --- a/src/stim/util_top/reference_sample_tree.cc +++ b/src/stim/util_top/reference_sample_tree.cc @@ -130,7 +130,7 @@ ReferenceSampleTree ReferenceSampleTree::simplified() const { if (flat.empty()) { return ReferenceSampleTree(); } else if (flat.size() == 1) { - return flat[0]; + return std::move(flat[0]); } ReferenceSampleTree result; diff --git a/src/stim/util_top/reference_sample_tree.inl b/src/stim/util_top/reference_sample_tree.inl index 68ff0824..746920dc 100644 --- a/src/stim/util_top/reference_sample_tree.inl +++ b/src/stim/util_top/reference_sample_tree.inl @@ -72,7 +72,7 @@ ReferenceSampleTree CompressedReferenceSampleHelper::do_loop_with_tortoise_ha } if (hare_steps == reps) { - // No loop found. + // No periodic state found before reaching the end of the loop. sim = std::move(hare.sim); return result; }