Skip to content

Commit

Permalink
Remove DLL_EXPORT from templated struct and protobuf definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
KangarooKoala committed Jul 9, 2024
1 parent e65dc1d commit 006b69c
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

#pragma once

#include <wpi/SymbolExports.h>
#include <wpi/protobuf/Protobuf.h>

#include "frc/controller/SimpleMotorFeedforward.h"
Expand All @@ -13,7 +12,7 @@
// frc::SimpleMotorFeedforward<units::meters>

template <class Distance>
struct WPILIB_DLLEXPORT wpi::Protobuf<frc::SimpleMotorFeedforward<Distance>> {
struct wpi::Protobuf<frc::SimpleMotorFeedforward<Distance>> {
static google::protobuf::Message* New(google::protobuf::Arena* arena);
static frc::SimpleMotorFeedforward<Distance> Unpack(
const google::protobuf::Message& msg);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

#pragma once

#include <wpi/SymbolExports.h>
#include <wpi/struct/Struct.h>

#include "frc/controller/SimpleMotorFeedforward.h"
Expand All @@ -13,7 +12,7 @@
// frc::SimpleMotorFeedforward<units::meters>

template <class Distance>
struct WPILIB_DLLEXPORT wpi::Struct<frc::SimpleMotorFeedforward<Distance>> {
struct wpi::Struct<frc::SimpleMotorFeedforward<Distance>> {
static constexpr std::string_view GetTypeString() {
return "struct:SimpleMotorFeedforward";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@

#pragma once

#include <wpi/SymbolExports.h>
#include <wpi/protobuf/Protobuf.h>

#include "frc/kinematics/SwerveDriveKinematics.h"

template <size_t NumModules>
struct WPILIB_DLLEXPORT wpi::Protobuf<frc::SwerveDriveKinematics<NumModules>> {
struct wpi::Protobuf<frc::SwerveDriveKinematics<NumModules>> {
static google::protobuf::Message* New(google::protobuf::Arena* arena);
static frc::SwerveDriveKinematics<NumModules> Unpack(
const google::protobuf::Message& msg);
Expand Down
4 changes: 1 addition & 3 deletions wpimath/src/main/native/include/frc/proto/MatrixProto.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@

#pragma once

#include <wpi/SymbolExports.h>
#include <wpi/protobuf/Protobuf.h>

#include "frc/EigenCore.h"

template <int Rows, int Cols, int Options, int MaxRows, int MaxCols>
requires(Cols != 1)
struct WPILIB_DLLEXPORT
wpi::Protobuf<frc::Matrixd<Rows, Cols, Options, MaxRows, MaxCols>> {
struct wpi::Protobuf<frc::Matrixd<Rows, Cols, Options, MaxRows, MaxCols>> {
static google::protobuf::Message* New(google::protobuf::Arena* arena);
static frc::Matrixd<Rows, Cols, Options, MaxRows, MaxCols> Unpack(
const google::protobuf::Message& msg);
Expand Down
4 changes: 1 addition & 3 deletions wpimath/src/main/native/include/frc/proto/VectorProto.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@

#pragma once

#include <wpi/SymbolExports.h>
#include <wpi/protobuf/Protobuf.h>

#include "frc/EigenCore.h"

template <int Size, int Options, int MaxRows, int MaxCols>
struct WPILIB_DLLEXPORT
wpi::Protobuf<frc::Matrixd<Size, 1, Options, MaxRows, MaxCols>> {
struct wpi::Protobuf<frc::Matrixd<Size, 1, Options, MaxRows, MaxCols>> {
static google::protobuf::Message* New(google::protobuf::Arena* arena);
static frc::Matrixd<Size, 1, Options, MaxRows, MaxCols> Unpack(
const google::protobuf::Message& msg);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@

#pragma once

#include <wpi/SymbolExports.h>
#include <wpi/protobuf/Protobuf.h>

#include "frc/proto/MatrixProto.h"
#include "frc/system/LinearSystem.h"

template <int States, int Inputs, int Outputs>
struct WPILIB_DLLEXPORT
wpi::Protobuf<frc::LinearSystem<States, Inputs, Outputs>> {
struct wpi::Protobuf<frc::LinearSystem<States, Inputs, Outputs>> {
static google::protobuf::Message* New(google::protobuf::Arena* arena);
static frc::LinearSystem<States, Inputs, Outputs> Unpack(
const google::protobuf::Message& msg);
Expand Down

0 comments on commit 006b69c

Please sign in to comment.