Shuffleboard: Fixed mix up of title and type parameters (#2121)

This commit is contained in:
Joshua Shannon
2020-03-15 00:06:57 -05:00
committed by GitHub
parent a26a7d217d
commit 4fd7c210d8
4 changed files with 9 additions and 9 deletions

View File

@@ -47,7 +47,7 @@ ShuffleboardLayout& ShuffleboardContainer::GetLayout(const wpi::Twine& title,
wpi::SmallVector<char, 16> storage;
auto titleRef = title.toStringRef(storage);
if (m_layouts.count(titleRef) == 0) {
auto layout = std::make_unique<ShuffleboardLayout>(*this, type, titleRef);
auto layout = std::make_unique<ShuffleboardLayout>(*this, titleRef, type);
auto ptr = layout.get();
m_components.emplace_back(std::move(layout));
m_layouts.insert(std::make_pair(titleRef, ptr));

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2018 FIRST. All Rights Reserved. */
/* Copyright (c) 2018-2019 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,11 +10,11 @@
using namespace frc;
ShuffleboardLayout::ShuffleboardLayout(ShuffleboardContainer& parent,
const wpi::Twine& name,
const wpi::Twine& title,
const wpi::Twine& type)
: ShuffleboardValue(type),
ShuffleboardComponent(parent, type, name),
ShuffleboardContainer(name) {
: ShuffleboardValue(title),
ShuffleboardComponent(parent, title, type),
ShuffleboardContainer(title) {
m_isLayout = true;
}