Initialize CommandLine::Settings fields using default member initializers
This makes it easier to verify that the fields within this struct areinitialized and ensures that the struct user doesn't hav
详情回复
发表于 2023-6-19 01:07
Correct initialization of m_config->shellChangeNotificationType
In d832f34b731e7ee11f0cc6482e4c1c71d1d31e71, the application was updated
to register for shell notifications for all fol
详情回复
发表于 2023-6-17 06:45
Correct initialization of m_config->shellChangeNotificationType
In d832f34b731e7ee11f0cc6482e4c1c71d1d31e71, the application was updated
to register for shell notifications for all folders by default. As part
of that change, the command line value was no longer assigned a default
value.
This then meant that if no value was entered, the command line value
would be uninitialized, which would cause
m_config->shellChangeNotificationType to be assigned a random value.
That could then cause directory monitoring to break, as
m_config->shellChangeNotificationType might not have had a valid value.
To fix that, the command line value is now loaded into a std::optional
and only assigned to m_config->shellChangeNotificationType if it
actually has a value.