From 148f43b4a53b86732684942f2bd511d08853ed4c Mon Sep 17 00:00:00 2001 From: Tyler Veness Date: Thu, 27 Aug 2020 20:45:14 -0700 Subject: [PATCH] [wpilibc] Use LLVM containers in ShuffleboardInstance (#2658) --- .../main/native/cpp/shuffleboard/ShuffleboardInstance.cpp | 5 +++-- .../native/include/frc/shuffleboard/ShuffleboardInstance.h | 5 ++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/wpilibc/src/main/native/cpp/shuffleboard/ShuffleboardInstance.cpp b/wpilibc/src/main/native/cpp/shuffleboard/ShuffleboardInstance.cpp index 9717a8e861..3316b3eee2 100644 --- a/wpilibc/src/main/native/cpp/shuffleboard/ShuffleboardInstance.cpp +++ b/wpilibc/src/main/native/cpp/shuffleboard/ShuffleboardInstance.cpp @@ -1,5 +1,5 @@ /*----------------------------------------------------------------------------*/ -/* Copyright (c) 2018-2019 FIRST. All Rights Reserved. */ +/* Copyright (c) 2018-2020 FIRST. All Rights Reserved. */ /* Open Source Software - may be modified and shared by FRC teams. The code */ /* must be accompanied by the FIRST BSD license file in the root directory of */ /* the project. */ @@ -10,6 +10,7 @@ #include #include #include +#include #include #include "frc/shuffleboard/Shuffleboard.h" @@ -43,7 +44,7 @@ frc::ShuffleboardTab& ShuffleboardInstance::GetTab(wpi::StringRef title) { void ShuffleboardInstance::Update() { if (m_impl->tabsChanged) { - std::vector tabTitles; + wpi::SmallVector tabTitles; for (auto& entry : m_impl->tabs) { tabTitles.emplace_back(entry.second.GetTitle()); } diff --git a/wpilibc/src/main/native/include/frc/shuffleboard/ShuffleboardInstance.h b/wpilibc/src/main/native/include/frc/shuffleboard/ShuffleboardInstance.h index b202160de8..2be985997e 100644 --- a/wpilibc/src/main/native/include/frc/shuffleboard/ShuffleboardInstance.h +++ b/wpilibc/src/main/native/include/frc/shuffleboard/ShuffleboardInstance.h @@ -1,5 +1,5 @@ /*----------------------------------------------------------------------------*/ -/* Copyright (c) 2018 FIRST. All Rights Reserved. */ +/* Copyright (c) 2018-2020 FIRST. All Rights Reserved. */ /* Open Source Software - may be modified and shared by FRC teams. The code */ /* must be accompanied by the FIRST BSD license file in the root directory of */ /* the project. */ @@ -20,6 +20,9 @@ class ShuffleboardInstance final : public ShuffleboardRoot { explicit ShuffleboardInstance(nt::NetworkTableInstance ntInstance); virtual ~ShuffleboardInstance(); + ShuffleboardInstance(ShuffleboardInstance&&) = default; + ShuffleboardInstance& operator=(ShuffleboardInstance&&) = default; + frc::ShuffleboardTab& GetTab(wpi::StringRef title) override; void Update() override;