summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/formats/ap2_dsk.cpp
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2015-12-04 10:29:21 +0100
committer Miodrag Milanovic <mmicko@gmail.com>2015-12-04 10:29:21 +0100
commit1b0ec08af5cd3b3268b5889ba4e30409431434e2 (patch)
tree42c510afaaeb15e1f97eff044a4d295586c30aaa /src/lib/formats/ap2_dsk.cpp
parent5a2f80dcde2e76356bf568f1e2d71b054a7db45b (diff)
clang-modernize part 6
Diffstat (limited to 'src/lib/formats/ap2_dsk.cpp')
-rw-r--r--src/lib/formats/ap2_dsk.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/lib/formats/ap2_dsk.cpp b/src/lib/formats/ap2_dsk.cpp
index cfc9b5350ef..49010ff62e1 100644
--- a/src/lib/formats/ap2_dsk.cpp
+++ b/src/lib/formats/ap2_dsk.cpp
@@ -774,9 +774,9 @@ bool a2_16sect_format::save(io_generic *io, floppy_image *image)
#define DATAGOOD 8
// data postamble is good
#define DATAPOST 16
- for (int i = 0; i < 16; i++) {
+ for (auto & elem : visualgrid) {
for (int j = 0; j < 35; j++) {
- visualgrid[i][j] = 0;
+ elem[j] = 0;
}
}
image->get_actual_geometry(g_tracks, g_heads);
@@ -822,8 +822,8 @@ bool a2_16sect_format::save(io_generic *io, floppy_image *image)
if(hb == 4) {
UINT8 h[11];
- for(int i=0; i<11; i++)
- h[i] = gb(buf, ts, pos, wrap);
+ for(auto & elem : h)
+ elem = gb(buf, ts, pos, wrap);
//UINT8 v2 = gcr6bw_tb[h[2]];
UINT8 vl = gcr4_decode(h[0],h[1]);
UINT8 tr = gcr4_decode(h[2],h[3]);
@@ -1140,9 +1140,9 @@ bool a2_rwts18_format::save(io_generic *io, floppy_image *image)
#define DATAGOOD 8
// data postamble is good
#define DATAPOST 16
- for (int i = 0; i < 18; i++) {
+ for (auto & elem : visualgrid) {
for (int j = 0; j < 35; j++) {
- visualgrid[i][j] = 0;
+ elem[j] = 0;
}
}
image->get_actual_geometry(g_tracks, g_heads);
@@ -1182,8 +1182,8 @@ bool a2_rwts18_format::save(io_generic *io, floppy_image *image)
if(hb == 4) {
UINT8 h[11];
- for(int i=0; i<11; i++)
- h[i] = gb(buf, ts, pos, wrap);
+ for(auto & elem : h)
+ elem = gb(buf, ts, pos, wrap);
//UINT8 v2 = gcr6bw_tb[h[2]];
UINT8 vl = gcr4_decode(h[0],h[1]);
UINT8 tr = gcr4_decode(h[2],h[3]);
@@ -1345,8 +1345,8 @@ bool a2_rwts18_format::save(io_generic *io, floppy_image *image)
oldpos=pos;
UINT8 h[7];
// grab exactly 7 bytes: should be Track, Sector, Checksum, AA, FF and FF and the Br0derbund Title ID
- for(int i=0; i<7; i++)
- h[i] = gb(buf, ts, pos, wrap);
+ for(auto & elem : h)
+ elem = gb(buf, ts, pos, wrap);
UINT8 tr = gcr6bw_tb[h[0]];
UINT8 se = gcr6bw_tb[h[1]];
UINT8 chk = gcr6bw_tb[h[2]];