1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-30 07:29:06 +00:00

Merge branch 'master' into Sleeper

This commit is contained in:
Thomas Harte 2017-08-20 10:58:03 -04:00
commit e3f2118757
2 changed files with 5 additions and 2 deletions

View File

@ -12,20 +12,22 @@
using namespace Storage::Disk;
Drive::Drive()
: head_position_(0), head_(0) {}
: head_position_(0), head_(0), has_disk_(false) {}
void Drive::set_disk(const std::shared_ptr<Disk> &disk) {
disk_ = disk;
track_ = nullptr;
has_disk_ = !!disk_;
}
void Drive::set_disk_with_track(const std::shared_ptr<Track> &track) {
disk_ = nullptr;
track_ = track;
has_disk_ = !!track_;
}
bool Drive::has_disk() {
return (bool)disk_ || (bool)track_;
return has_disk_;
}
bool Drive::get_is_track_zero() {

View File

@ -73,6 +73,7 @@ class Drive {
private:
std::shared_ptr<Track> track_;
std::shared_ptr<Disk> disk_;
bool has_disk_;
int head_position_;
unsigned int head_;
};