--- nono/vm/dipsw.h 2026/04/29 17:05:17 1.1 +++ nono/vm/dipsw.h 2026/04/29 17:05:29 1.1.1.2 @@ -17,7 +17,7 @@ class DipswDevice : public Device { using inherited = Device; public: - DipswDevice(int sz_); + explicit DipswDevice(int sz_); ~DipswDevice() override; // 総数を返す。 @@ -25,13 +25,13 @@ class DipswDevice : public Device // DIPSW n 番の値を取得/設定する。 // true/false の割り当て方は機種依存。 - bool Get(int n) const; - void Set(int n, bool val); + bool Get(uint n) const; + void Set(uint n, bool val); // DIPSW n 番の物理位置を取得/設定する。0 が上、1が下。 // これは GUI 用なので、値の向きはスクロールバーの position に由来。 - int GetPosition(int n) const; - void SetPosition(int n, int val); + int GetPosition(uint n) const; + void SetPosition(uint n, uint val); protected: std::vector dipsw {}; @@ -39,7 +39,7 @@ class DipswDevice : public Device // 論理値と物理位置の対応。 // upside が true なら、上が true // upside が false なら、上が false。 - bool upside; + bool upside {}; }; // LUNA の DIPSW