--- nono/debugger/console.h 2026/04/29 17:04:33 1.1.1.2 +++ nono/debugger/console.h 2026/04/29 17:04:53 1.1.1.4 @@ -49,17 +49,17 @@ class Console struct { int fd; FILE *file; - } inp, out; + } inp {}, out {}; // Editline を使うかどうかのフラグ。継承側がセットする。 // 今のところ TCP console では動かないのでこんなことになっている。 - bool use_editline = false; + bool use_editline {}; // Editline - const char *prompt = NULL; + const char *prompt {}; #if defined(HAVE_HISTEDIT_H) - EditLine *el = NULL; - History *hist = NULL; + EditLine *el {}; + History *hist {}; HistEvent hev {}; #endif @@ -72,8 +72,7 @@ class Console }; // 標準入出力コンソール -class ConsoleStdio - : public Console +class ConsoleStdio : public Console { public: ConsoleStdio(); @@ -85,8 +84,7 @@ class ConsoleStdio }; // TCP コンソール -class ConsoleTCP - : public Console +class ConsoleTCP : public Console { using inherited = Console; public: @@ -98,8 +96,8 @@ class ConsoleTCP void Close() override; private: - int ls = 0; - int sock = 0; - struct addrinfo *res = NULL; - struct addrinfo *ai = NULL; + int ls {}; + int sock {}; + struct addrinfo *res {}; + struct addrinfo *ai {}; };