On 2017-02-05 00:01-0000 Phil Rosenberg wrote:

> It [initialization of private non-const member] should be done in the 
> constructor, so in PlDevice::PlDevice ()

Hi Phil:

That idea makes perfect sense.  However, there was no explicit
constructor for PLDevice. So I had to implement that also, and it was
much tougher than it should have been because the top C++ tutorials
according to google about creating constructors that initialize values
are completely misleading about how to do that (see
<http://www.cplusplus.com/doc/tutorial/classes/> and
<https://www.tutorialspoint.com/cplusplus/cpp_constructor_destructor.htm>).
Using the style they advocated always created multiple
PlDevice::PlDevice symbol definition issues with the linker.  So
instead, I implemented a constructor using a much simpler style that I
guessed at, and it worked (i.e., no compiler warnings no valgrind
memory issues).

But because I guessed, will you please carefully review what I
did (commit d2218b3) to make sure I didn't screw up?

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to