On 20/12/2016 20:49, Black Michael wrote:
With the "old" way the ShowControls value always hits the default on reading.
With the SettingsGroup it reads it correctly.

Hi Mike,

those are not equivalent. In what you call the "old" way the settings group is closed just after setRxRange(m_fMin) but the so called "new" way only closes the settings group when the SettingsGroup object instance goes out of scope, which is the closing brace of the constructor.

I suggest you look at the implementation of SettingsGroup and do a bit of research on "Resource Acquisition Is Initialization" (RAII) a.k.a. Execute Around. This is a fundamental idiom in modern C++ for writing code with exception safety guarantees when dealing with various resources.

73
Bill
G4WJS.

------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
_______________________________________________
wsjt-devel mailing list
wsjt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wsjt-devel

Reply via email to