Skip to content

Commit f0d8608

Browse files
kytpbsKangarooKoala
andcommitted
use pass by value similar to convention
I didn't know you could just pass by value by doing this thx @KangarooKoala for pointing it out. Co-Authored-By: Joseph Eng <[email protected]>
1 parent 6e88f89 commit f0d8608

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

wpilibNewCommands/src/main/native/cpp/frc2/command/CommandPtr.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ CommandPtr CommandPtr::Repeatedly(int times) && {
5454
AssertValid();
5555
std::shared_ptr<int> countPtr = std::make_shared<int>(0);
5656
return std::move(*this)
57-
.FinallyDo([countPtr = countPtr] { (*countPtr)++; })
57+
.FinallyDo([countPtr] { (*countPtr)++; })
5858
.Repeatedly()
59-
.Until([countPtr = countPtr, times = times] {
59+
.Until([countPtr, times] {
6060
return ((*countPtr) >= times);
6161
});
6262
}

0 commit comments

Comments
 (0)