========================================================================
http://mondrian.corp.google.com/file/10892071///depot/googleclient/gears/opensource/gears/desktop/drag_and_drop_utils_cr.cc?a=1
File
//depot/googleclient/gears/opensource/gears/desktop/drag_and_drop_utils_cr.cc
(snapshot 1)
------------------------------------
Line 43: #define ELEMENT_EVENT_DRAGENTER 1
> > Making the INVALID enum be zero sounds good to me.
>
> ok, so I can add the drag_and_drop_utils_common.h to this CL and make that
> change?
Yes.
------------------------------------
Line 382: if (!g_identity || g_identity < drag.identity()) {
> The identity always increases so unsigned looks right.
As I said, even if unsigned looks right, I still think it's usually not worth
the hassle.
> > > > Or should the "<" instead be a "!="?
> > >
> > > We need the "<"
> >
> > OK, if it's strictly increasing, then can you assert that !(g_identity >
> > drag.identity())?
>
> hmm, the identity check does that, or were you taking about the case where the
> identity wraps back to 0?
No, the identity check looks for "<", not "!=". I'm not thinking about
wrap-around. I'm just saying that if your code assumes that identity is always
increasing, then I think you should assert that it is always increasing.
========================================================================
--
To respond, reply to this email or visit
http://mondrian.corp.google.com/10892071