mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
Fixes pessimistic std::move (#1069)
Also adds test to ensure all the sim headers get compiled Closes #1068
This commit is contained in:
committed by
Peter Johnson
parent
ef442d775d
commit
11d46713d1
@@ -27,7 +27,7 @@ class EncoderSim {
|
||||
m_index, -1, callback, &HALSIM_CancelEncoderInitializedCallback);
|
||||
store->SetUid(HALSIM_RegisterEncoderInitializedCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
bool GetInitialized() { return HALSIM_GetEncoderInitialized(m_index); }
|
||||
void SetInitialized(bool initialized) {
|
||||
@@ -40,7 +40,7 @@ class EncoderSim {
|
||||
m_index, -1, callback, &HALSIM_CancelEncoderCountCallback);
|
||||
store->SetUid(HALSIM_RegisterEncoderCountCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
int GetCount() { return HALSIM_GetEncoderCount(m_index); }
|
||||
void SetCount(int count) { HALSIM_SetEncoderCount(m_index, count); }
|
||||
@@ -51,7 +51,7 @@ class EncoderSim {
|
||||
m_index, -1, callback, &HALSIM_CancelEncoderPeriodCallback);
|
||||
store->SetUid(HALSIM_RegisterEncoderPeriodCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
double GetPeriod() { return HALSIM_GetEncoderPeriod(m_index); }
|
||||
void SetPeriod(double period) { HALSIM_SetEncoderPeriod(m_index, period); }
|
||||
@@ -62,7 +62,7 @@ class EncoderSim {
|
||||
m_index, -1, callback, &HALSIM_CancelEncoderResetCallback);
|
||||
store->SetUid(HALSIM_RegisterEncoderResetCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
bool GetReset() { return HALSIM_GetEncoderReset(m_index); }
|
||||
void SetReset(bool reset) { HALSIM_SetEncoderReset(m_index, reset); }
|
||||
@@ -73,7 +73,7 @@ class EncoderSim {
|
||||
m_index, -1, callback, &HALSIM_CancelEncoderMaxPeriodCallback);
|
||||
store->SetUid(HALSIM_RegisterEncoderMaxPeriodCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
double GetMaxPeriod() { return HALSIM_GetEncoderMaxPeriod(m_index); }
|
||||
void SetMaxPeriod(double maxPeriod) {
|
||||
@@ -86,7 +86,7 @@ class EncoderSim {
|
||||
m_index, -1, callback, &HALSIM_CancelEncoderDirectionCallback);
|
||||
store->SetUid(HALSIM_RegisterEncoderDirectionCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
bool GetDirection() { return HALSIM_GetEncoderDirection(m_index); }
|
||||
void SetDirection(bool direction) {
|
||||
@@ -99,7 +99,7 @@ class EncoderSim {
|
||||
m_index, -1, callback, &HALSIM_CancelEncoderReverseDirectionCallback);
|
||||
store->SetUid(HALSIM_RegisterEncoderReverseDirectionCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
bool GetReverseDirection() {
|
||||
return HALSIM_GetEncoderReverseDirection(m_index);
|
||||
@@ -114,7 +114,7 @@ class EncoderSim {
|
||||
m_index, -1, callback, &HALSIM_CancelEncoderSamplesToAverageCallback);
|
||||
store->SetUid(HALSIM_RegisterEncoderSamplesToAverageCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
int GetSamplesToAverage() {
|
||||
return HALSIM_GetEncoderSamplesToAverage(m_index);
|
||||
|
||||
Reference in New Issue
Block a user