mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-22 12:33:29 +00:00
Name repeated constant.
(... and, I think, four is enough)
This commit is contained in:
parent
7b343b25cc
commit
f83c3e7af0
@ -55,6 +55,8 @@ long NIB::file_offset(Track::Address address) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<::Storage::Disk::Track> NIB::get_track_at_position(::Storage::Disk::Track::Address address) {
|
std::shared_ptr<::Storage::Disk::Track> NIB::get_track_at_position(::Storage::Disk::Track::Address address) {
|
||||||
|
static constexpr size_t MinimumSyncByteCount = 4;
|
||||||
|
|
||||||
// NIBs contain data for a fixed quantity of integer-position tracks underneath a single head only.
|
// NIBs contain data for a fixed quantity of integer-position tracks underneath a single head only.
|
||||||
//
|
//
|
||||||
// Therefore:
|
// Therefore:
|
||||||
@ -91,8 +93,8 @@ std::shared_ptr<::Storage::Disk::Track> NIB::get_track_at_position(::Storage::Di
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If that's at least five, regress and mark all as syncs.
|
// If that's at least five, regress and mark all as syncs.
|
||||||
if(length >= 5) {
|
if(length >= MinimumSyncByteCount) {
|
||||||
for(int c = 0; c < 5; c++) {
|
for(int c = 0; c < int(MinimumSyncByteCount); c++) {
|
||||||
end = (end + track_data.size() - 1) % track_data.size();
|
end = (end + track_data.size() - 1) % track_data.size();
|
||||||
sync_locations.insert(end);
|
sync_locations.insert(end);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user