mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
Shuffleboard: Fixed mix up of title and type parameters (#2121)
This commit is contained in:
@@ -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));
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user