davidedmundson added inline comments. | View Revision
if you turn this into a method you don't need the rollover/invert args
Or, even simpler: I'll just drop the duplication between the in-class bool (i.e. the the cached value), and the m_options config bool and always look it up in m_options, should be fast enough.
Btw, would a std::shared_ptr have been Ok for once? That does not have the bug prone non-explicit bool problem and would work as expected.
Btw, would a std::shared_ptr have been Ok for once?
TBH, I still would have considered it overkill. It's only two checkboxes, it doesn't need any custom design patterns.
If you did want to reduce the few lines of duplication, KConfigXT is the framework to look at for doing this sort of thing.