[PATCH] Add dive list view to main window

Henrik Brautaset Aronsen henrik at synth.no
Thu Apr 11 10:08:22 PDT 2013


Den 11. apr. 2013 18:50 skrev "Lubomir I. Ivanov" <neolit123 at gmail.com>
følgende:
>
> On 11 April 2013 19:43, Henrik Brautaset Aronsen <henrik at synth.no> wrote:
> >
> > Den 11. apr. 2013 18:27 skrev "Lubomir I. Ivanov" <neolit123 at gmail.com>
> > følgende:
> >
> >
> >> > +DiveItem::DiveItem(int num, QString dt, float dur, float dep,
QString
> >> > loc, DiveItem *p):
> >> > +    m_number(num), m_dateTime(dt), m_duration(dur), m_depth(dep),
> >> > m_location(loc), m_parent(p)
> >> in another thread i pointed out that m_name or m_Name for members is
> >> not preferable over mName. perhaps others could comment here as well.
> >
> > Just out of curiosity: what's that m prefix for?
> >
>
> some C++ programmers prefix their class members with 'm' or '_'.
> this thread gives some more examples:
>
http://stackoverflow.com/questions/1228161/why-use-prefixes-on-member-variables-in-c-classes

It seems unnecessary.  This comment sums it up for me:

"I used to use a m prefix, until someone pointed out that "C++ already has
a standard prefix for member access: this->.

So that's what I use now. That is, when there is ambiguity, I add the
this-> prefix, but usually, no ambiguity exists, and I can just refer
directly to the variable name.

To me, that's the best of both worlds. I have a prefix I can use when I
need it, and I'm free to leave it out whenever possible."

Henrik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20130411/d8e4043e/attachment.html>


More information about the subsurface mailing list