mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-02 02:51:42 +00:00
[wpimath] Add extern templates for common cases
This helps reduce compile times and memory usage.
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
#include <wpi/SymbolExports.h>
|
||||
#include <wpi/array.h>
|
||||
|
||||
#include "Eigen/Core"
|
||||
@@ -185,6 +186,10 @@ class SwerveDriveKinematics {
|
||||
|
||||
mutable Translation2d m_previousCoR;
|
||||
};
|
||||
|
||||
extern template class EXPORT_TEMPLATE_DECLARE(WPILIB_DLLEXPORT)
|
||||
SwerveDriveKinematics<4>;
|
||||
|
||||
} // namespace frc
|
||||
|
||||
#include "SwerveDriveKinematics.inc"
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <cstddef>
|
||||
#include <ctime>
|
||||
|
||||
#include <wpi/SymbolExports.h>
|
||||
#include <wpi/timestamp.h>
|
||||
|
||||
#include "SwerveDriveKinematics.h"
|
||||
@@ -112,6 +113,9 @@ class SwerveDriveOdometry {
|
||||
Rotation2d m_gyroOffset;
|
||||
};
|
||||
|
||||
extern template class EXPORT_TEMPLATE_DECLARE(WPILIB_DLLEXPORT)
|
||||
SwerveDriveOdometry<4>;
|
||||
|
||||
} // namespace frc
|
||||
|
||||
#include "SwerveDriveOdometry.inc"
|
||||
|
||||
Reference in New Issue
Block a user