Fixes pessimistic std::move (#1069)

Also adds test to ensure all the sim headers get compiled

Closes #1068
This commit is contained in:
Thad House
2018-05-16 19:45:46 -07:00
committed by Peter Johnson
parent ef442d775d
commit 11d46713d1
16 changed files with 134 additions and 85 deletions

View File

@@ -27,7 +27,7 @@ class RoboRioSim {
m_index, -1, callback, &HALSIM_CancelRoboRioFPGAButtonCallback);
store->SetUid(HALSIM_RegisterRoboRioFPGAButtonCallback(
m_index, &CallbackStoreThunk, store.get(), initialNotify));
return std::move(store);
return store;
}
bool GetFPGAButton() { return HALSIM_GetRoboRioFPGAButton(m_index); }
void SetFPGAButton(bool fPGAButton) {
@@ -40,7 +40,7 @@ class RoboRioSim {
m_index, -1, callback, &HALSIM_CancelRoboRioVInVoltageCallback);
store->SetUid(HALSIM_RegisterRoboRioVInVoltageCallback(
m_index, &CallbackStoreThunk, store.get(), initialNotify));
return std::move(store);
return store;
}
double GetVInVoltage() { return HALSIM_GetRoboRioVInVoltage(m_index); }
void SetVInVoltage(double vInVoltage) {
@@ -53,7 +53,7 @@ class RoboRioSim {
m_index, -1, callback, &HALSIM_CancelRoboRioVInCurrentCallback);
store->SetUid(HALSIM_RegisterRoboRioVInCurrentCallback(
m_index, &CallbackStoreThunk, store.get(), initialNotify));
return std::move(store);
return store;
}
double GetVInCurrent() { return HALSIM_GetRoboRioVInCurrent(m_index); }
void SetVInCurrent(double vInCurrent) {
@@ -66,7 +66,7 @@ class RoboRioSim {
m_index, -1, callback, &HALSIM_CancelRoboRioUserVoltage6VCallback);
store->SetUid(HALSIM_RegisterRoboRioUserVoltage6VCallback(
m_index, &CallbackStoreThunk, store.get(), initialNotify));
return std::move(store);
return store;
}
double GetUserVoltage6V() { return HALSIM_GetRoboRioUserVoltage6V(m_index); }
void SetUserVoltage6V(double userVoltage6V) {
@@ -79,7 +79,7 @@ class RoboRioSim {
m_index, -1, callback, &HALSIM_CancelRoboRioUserCurrent6VCallback);
store->SetUid(HALSIM_RegisterRoboRioUserCurrent6VCallback(
m_index, &CallbackStoreThunk, store.get(), initialNotify));
return std::move(store);
return store;
}
double GetUserCurrent6V() { return HALSIM_GetRoboRioUserCurrent6V(m_index); }
void SetUserCurrent6V(double userCurrent6V) {
@@ -92,7 +92,7 @@ class RoboRioSim {
m_index, -1, callback, &HALSIM_CancelRoboRioUserActive6VCallback);
store->SetUid(HALSIM_RegisterRoboRioUserActive6VCallback(
m_index, &CallbackStoreThunk, store.get(), initialNotify));
return std::move(store);
return store;
}
bool GetUserActive6V() { return HALSIM_GetRoboRioUserActive6V(m_index); }
void SetUserActive6V(bool userActive6V) {
@@ -105,7 +105,7 @@ class RoboRioSim {
m_index, -1, callback, &HALSIM_CancelRoboRioUserVoltage5VCallback);
store->SetUid(HALSIM_RegisterRoboRioUserVoltage5VCallback(
m_index, &CallbackStoreThunk, store.get(), initialNotify));
return std::move(store);
return store;
}
double GetUserVoltage5V() { return HALSIM_GetRoboRioUserVoltage5V(m_index); }
void SetUserVoltage5V(double userVoltage5V) {
@@ -118,7 +118,7 @@ class RoboRioSim {
m_index, -1, callback, &HALSIM_CancelRoboRioUserCurrent5VCallback);
store->SetUid(HALSIM_RegisterRoboRioUserCurrent5VCallback(
m_index, &CallbackStoreThunk, store.get(), initialNotify));
return std::move(store);
return store;
}
double GetUserCurrent5V() { return HALSIM_GetRoboRioUserCurrent5V(m_index); }
void SetUserCurrent5V(double userCurrent5V) {
@@ -131,7 +131,7 @@ class RoboRioSim {
m_index, -1, callback, &HALSIM_CancelRoboRioUserActive5VCallback);
store->SetUid(HALSIM_RegisterRoboRioUserActive5VCallback(
m_index, &CallbackStoreThunk, store.get(), initialNotify));
return std::move(store);
return store;
}
bool GetUserActive5V() { return HALSIM_GetRoboRioUserActive5V(m_index); }
void SetUserActive5V(bool userActive5V) {
@@ -144,7 +144,7 @@ class RoboRioSim {
m_index, -1, callback, &HALSIM_CancelRoboRioUserVoltage3V3Callback);
store->SetUid(HALSIM_RegisterRoboRioUserVoltage3V3Callback(
m_index, &CallbackStoreThunk, store.get(), initialNotify));
return std::move(store);
return store;
}
double GetUserVoltage3V3() {
return HALSIM_GetRoboRioUserVoltage3V3(m_index);
@@ -159,7 +159,7 @@ class RoboRioSim {
m_index, -1, callback, &HALSIM_CancelRoboRioUserCurrent3V3Callback);
store->SetUid(HALSIM_RegisterRoboRioUserCurrent3V3Callback(
m_index, &CallbackStoreThunk, store.get(), initialNotify));
return std::move(store);
return store;
}
double GetUserCurrent3V3() {
return HALSIM_GetRoboRioUserCurrent3V3(m_index);
@@ -174,7 +174,7 @@ class RoboRioSim {
m_index, -1, callback, &HALSIM_CancelRoboRioUserActive3V3Callback);
store->SetUid(HALSIM_RegisterRoboRioUserActive3V3Callback(
m_index, &CallbackStoreThunk, store.get(), initialNotify));
return std::move(store);
return store;
}
bool GetUserActive3V3() { return HALSIM_GetRoboRioUserActive3V3(m_index); }
void SetUserActive3V3(bool userActive3V3) {
@@ -187,7 +187,7 @@ class RoboRioSim {
m_index, -1, callback, &HALSIM_CancelRoboRioUserFaults6VCallback);
store->SetUid(HALSIM_RegisterRoboRioUserFaults6VCallback(
m_index, &CallbackStoreThunk, store.get(), initialNotify));
return std::move(store);
return store;
}
int GetUserFaults6V() { return HALSIM_GetRoboRioUserFaults6V(m_index); }
void SetUserFaults6V(int userFaults6V) {
@@ -200,7 +200,7 @@ class RoboRioSim {
m_index, -1, callback, &HALSIM_CancelRoboRioUserFaults5VCallback);
store->SetUid(HALSIM_RegisterRoboRioUserFaults5VCallback(
m_index, &CallbackStoreThunk, store.get(), initialNotify));
return std::move(store);
return store;
}
int GetUserFaults5V() { return HALSIM_GetRoboRioUserFaults5V(m_index); }
void SetUserFaults5V(int userFaults5V) {
@@ -213,7 +213,7 @@ class RoboRioSim {
m_index, -1, callback, &HALSIM_CancelRoboRioUserFaults3V3Callback);
store->SetUid(HALSIM_RegisterRoboRioUserFaults3V3Callback(
m_index, &CallbackStoreThunk, store.get(), initialNotify));
return std::move(store);
return store;
}
int GetUserFaults3V3() { return HALSIM_GetRoboRioUserFaults3V3(m_index); }
void SetUserFaults3V3(int userFaults3V3) {