--- nono/vm/dipsw.cpp 2026/04/29 17:05:17 1.1.1.1 +++ nono/vm/dipsw.cpp 2026/04/29 17:05:29 1.1.1.2 @@ -30,27 +30,27 @@ DipswDevice::~DipswDevice() // 値を設定。true/false の意味は機種依存。 void -DipswDevice::Set(int n, bool val) +DipswDevice::Set(uint n, bool val) { - assertmsg(0 <= n && n < dipsw.size(), - "n=%d size=%zd: out of range", n, dipsw.size()); + assertmsg(n < dipsw.size(), + "n=%u size=%zu: out of range", n, dipsw.size()); dipsw[n] = val; } // 値を取得。true/false の意味は機種依存。 bool -DipswDevice::Get(int n) const +DipswDevice::Get(uint n) const { - assertmsg(0 <= n && n < dipsw.size(), - "n=%d size=%zd: out of range", n, dipsw.size()); + assertmsg(n < dipsw.size(), + "n=%u size=%zu: out of range", n, dipsw.size()); return dipsw[n]; } // 位置を設定。pos は 0 が上、1 が下。 void -DipswDevice::SetPosition(int n, int pos) +DipswDevice::SetPosition(uint n, uint pos) { bool val; @@ -64,7 +64,7 @@ DipswDevice::SetPosition(int n, int pos) // 位置を取得。戻り値は 0 が上、1 が下。 int -DipswDevice::GetPosition(int n) const +DipswDevice::GetPosition(uint n) const { bool val = Get(n); int pos;