From c8ba0e2dd07be815cc95ae00925fe28214425819 Mon Sep 17 00:00:00 2001 From: Mohammad Durrani <46766905+mdurrani808@users.noreply.github.com> Date: Tue, 5 Sep 2023 16:53:03 -0400 Subject: [PATCH 1/2] Remove casts to double --- photon-lib/src/main/native/cpp/photonlib/PhotonCamera.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/photon-lib/src/main/native/cpp/photonlib/PhotonCamera.cpp b/photon-lib/src/main/native/cpp/photonlib/PhotonCamera.cpp index 7988774324..30d90e8d3b 100644 --- a/photon-lib/src/main/native/cpp/photonlib/PhotonCamera.cpp +++ b/photon-lib/src/main/native/cpp/photonlib/PhotonCamera.cpp @@ -116,7 +116,7 @@ void PhotonCamera::TakeOutputSnapshot() { bool PhotonCamera::GetDriverMode() const { return driverModeSubscriber.Get(); } void PhotonCamera::SetPipelineIndex(int index) { - pipelineIndexPub.Set(static_cast(index)); + pipelineIndexPub.Set(index); } int PhotonCamera::GetPipelineIndex() const { @@ -137,7 +137,7 @@ std::optional PhotonCamera::GetCameraMatrix() { } void PhotonCamera::SetLEDMode(LEDMode mode) { - ledModePub.Set(static_cast(static_cast(mode))); + ledModePub.Set(static_cast(mode)); } const std::string_view PhotonCamera::GetCameraName() const { From b71c38bde45970ccd4b07c3862b3f6e493e1ea08 Mon Sep 17 00:00:00 2001 From: Matthew Morley Date: Thu, 7 Sep 2023 20:36:33 -0400 Subject: [PATCH 2/2] Run wpiformat --- photon-lib/src/main/native/cpp/photonlib/PhotonCamera.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/photon-lib/src/main/native/cpp/photonlib/PhotonCamera.cpp b/photon-lib/src/main/native/cpp/photonlib/PhotonCamera.cpp index 30d90e8d3b..d0901b10bd 100644 --- a/photon-lib/src/main/native/cpp/photonlib/PhotonCamera.cpp +++ b/photon-lib/src/main/native/cpp/photonlib/PhotonCamera.cpp @@ -115,9 +115,7 @@ void PhotonCamera::TakeOutputSnapshot() { bool PhotonCamera::GetDriverMode() const { return driverModeSubscriber.Get(); } -void PhotonCamera::SetPipelineIndex(int index) { - pipelineIndexPub.Set(index); -} +void PhotonCamera::SetPipelineIndex(int index) { pipelineIndexPub.Set(index); } int PhotonCamera::GetPipelineIndex() const { return static_cast(pipelineIndexSub.Get());