Fix spacing and const correctness in sim (#1269)

This commit is contained in:
PJ Reiniger
2018-08-16 01:17:59 -04:00
committed by Peter Johnson
parent 44099d9a21
commit 1462a5bd46
17 changed files with 294 additions and 86 deletions

View File

@@ -29,7 +29,9 @@ class AnalogOutSim {
m_index, &CallbackStoreThunk, store.get(), initialNotify));
return store;
}
double GetVoltage() { return HALSIM_GetAnalogOutVoltage(m_index); }
double GetVoltage() const { return HALSIM_GetAnalogOutVoltage(m_index); }
void SetVoltage(double voltage) {
HALSIM_SetAnalogOutVoltage(m_index, voltage);
}
@@ -42,7 +44,11 @@ class AnalogOutSim {
m_index, &CallbackStoreThunk, store.get(), initialNotify));
return store;
}
bool GetInitialized() { return HALSIM_GetAnalogOutInitialized(m_index); }
bool GetInitialized() const {
return HALSIM_GetAnalogOutInitialized(m_index);
}
void SetInitialized(bool initialized) {
HALSIM_SetAnalogOutInitialized(m_index, initialized);
}