Re: Drawing a point in a pixbuf.
- From: "Jose Hevia" <jose francisco hevia gmail com>
- To: "Magnus Myrefors" <myrefors magnus telia com>
- Cc: gtk-list gnome org
- Subject: Re: Drawing a point in a pixbuf.
- Date: Mon, 12 Feb 2007 20:54:40 +0100
-> *p++ = 0xff;
Please don't do that, different compilers will interpret this differently.
I understand this means:
+increment *p (the content of the variable p points to)
+store 0xff in *p
OR
+increment p
+store 0xff in *p
This notation is asking for problems. Use ()s, or better put:
*p =0xff;
p++;
Then someone like me will be able to understand the code without
thinking too much, and it is easier to track with the debugger.
*p++ = 0;
*p++ = 0xfc;
*p = has_alpha;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]