mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-06 03:31:43 +00:00
SCRIPT namespace replacements
This commit is contained in:
committed by
Peter Johnson
parent
ae6c043632
commit
9aca8e0fd6
@@ -17,7 +17,7 @@
|
||||
#include "wpi/util/sendable/Sendable.hpp"
|
||||
#include "wpi/util/sendable/SendableBuilder.hpp"
|
||||
|
||||
using namespace wpi;
|
||||
using namespace wpi::util;
|
||||
|
||||
namespace {
|
||||
struct Component {
|
||||
@@ -26,7 +26,7 @@ struct Component {
|
||||
std::string name;
|
||||
std::string subsystem = "Ungrouped";
|
||||
Sendable* parent = nullptr;
|
||||
wpi::SmallVector<std::shared_ptr<void>, 2> data;
|
||||
wpi::util::SmallVector<std::shared_ptr<void>, 2> data;
|
||||
|
||||
void SetName(std::string_view moduleType, int channel) {
|
||||
name = fmt::format("{}[{}]", moduleType, channel);
|
||||
@@ -38,10 +38,10 @@ struct Component {
|
||||
};
|
||||
|
||||
struct SendableRegistryInst {
|
||||
wpi::recursive_mutex mutex;
|
||||
wpi::util::recursive_mutex mutex;
|
||||
|
||||
wpi::UidVector<std::unique_ptr<Component>, 32> components;
|
||||
wpi::DenseMap<void*, SendableRegistry::UID> componentMap;
|
||||
wpi::util::UidVector<std::unique_ptr<Component>, 32> components;
|
||||
wpi::util::DenseMap<void*, SendableRegistry::UID> componentMap;
|
||||
int nextDataHandle = 0;
|
||||
|
||||
Component& GetOrAdd(void* sendable, SendableRegistry::UID* uid = nullptr);
|
||||
@@ -72,11 +72,11 @@ static SendableRegistryInst& GetInstance() {
|
||||
}
|
||||
|
||||
#ifndef __FRC_SYSTEMCORE__
|
||||
namespace wpi::impl {
|
||||
namespace wpi::util::impl {
|
||||
void ResetSendableRegistry() {
|
||||
std::make_unique<SendableRegistryInst>().swap(GetInstanceHolder());
|
||||
}
|
||||
} // namespace wpi::impl
|
||||
} // namespace wpi::util::impl
|
||||
#endif
|
||||
|
||||
void SendableRegistry::EnsureInitialized() {
|
||||
|
||||
Reference in New Issue
Block a user