1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-26 08:49:37 +00:00

Mark get_state as const.

This commit is contained in:
Thomas Harte 2022-09-15 16:13:54 -04:00
parent 2f78a1c7af
commit 5ed60f9153
2 changed files with 4 additions and 2 deletions

View File

@ -74,7 +74,7 @@ void Bus::set_activity_observer(Activity::Observer *observer) {
activity_observer_->register_led("SCSI");
}
BusState Bus::get_state() {
BusState Bus::get_state() const {
return state_;
}

View File

@ -19,6 +19,8 @@
namespace SCSI {
/// Provides the current state of the SCSI bus, being comprised of a bitwise combination
/// of zero or more of the @c BusState flags defined below.
typedef int BusState;
constexpr BusState DefaultBusState = 0;
@ -118,7 +120,7 @@ class Bus: public ClockingHint::Source, public Activity::Source {
/*!
@returns the current state of the bus.
*/
BusState get_state();
BusState get_state() const;
struct Observer {
/// Reports to an observer that the bus changed from a previous state to @c new_state,