対値のような暗黙のデフォルト値に依存しているのは悪い習慣です:代わりにそれらを明示的に設定するは、明示的な値
class Node
{
int red;
int green;
int blue;
bool grayscale;
Node next;
}
:
class Node
{
int red = 0;
int green = 0;
int blue = 0;
bool grayscale = false;
Node next = null;
}
私は同意します。私の脳が処理するための画面上の情報が少ないほど、より良い。 – Vadim