From kde-core-devel Sat Nov 10 22:21:01 2012 From: "Rolf Eike Beer" Date: Sat, 10 Nov 2012 22:21:01 +0000 To: kde-core-devel Subject: Re: Review Request: parenthesis and not null checking Message-Id: <20121110222101.24587.24831 () vidsolbach ! de> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=135258609027112 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============1990592289250090575==" --===============1990592289250090575== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/107213/#review21785 ----------------------------------------------------------- A simple way to verify if this is correct is check if you and the compiler = agree on the code. Run "make -n" in the build tree to get the full compiler= command line, then insert a "-S" (assuming you are using gcc) and change t= he -o to point to a temporary file. This will output the assembler code. Do= this with and without your modifications and look if the result is still t= he same. - Rolf Eike Beer On Nov. 5, 2012, 3:13 p.m., Jaime Torres Amate wrote: > = > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://git.reviewboard.kde.org/r/107213/ > ----------------------------------------------------------- > = > (Updated Nov. 5, 2012, 3:13 p.m.) > = > = > Review request for kdelibs. > = > = > Description > ------- > = > place some parenthesis around ! operators, with less priority than ^ oper= ators. > place some parenthesis around =3D inside conditions = > check for n not being null before using it > simplify if (a=3D=3Dtrue) return true else return false; > = > = > Diffs > ----- > = > khtml/khtml_caret.cpp 45fd90c = > khtml/rendering/render_inline.cpp acfc1e4 = > khtml/rendering/render_object.cpp f37627c = > solid/solid/backends/wmi/wmiopticaldisc.cpp c6e390f = > = > Diff: http://git.reviewboard.kde.org/r/107213/diff/ > = > = > Testing > ------- > = > I've been using this code several weeks. > = > = > Thanks, > = > Jaime Torres Amate > = > --===============1990592289250090575== Content-Type: text/html; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable
This is an automatically generated e-mail. To reply, visit: http://git.revie= wboard.kde.org/r/107213/

A simple w=
ay to verify if this is correct is check if you and the compiler agree on t=
he code. Run "make -n" in the build tree to get the full compiler=
 command line, then insert a "-S" (assuming you are using gcc) an=
d change the -o to point to a temporary file. This will output the assemble=
r code. Do this with and without your modifications and look if the result =
is still the same.

- Rolf Eike


On November 5th, 2012, 3:13 p.m., Jaime Torres Amate wrote:

Review request for kdelibs.
By Jaime Torres Amate.

Updated Nov. 5, 2012, 3:13 p.m.

Descripti= on

place some parenthesis around ! operators, with less priorit=
y than ^ operators.
place some parenthesis around =3D inside conditions =

check for n not being null before using it
simplify if (a=3D=3Dtrue) return true else return false;

Testing <= /h1>
I've been using this code several weeks.

Diffs=

  • khtml/khtml_caret.cpp (45fd90c)
  • khtml/rendering/render_inline.cpp (acfc1e4= )
  • khtml/rendering/render_object.cpp (f37627c= )
  • solid/solid/backends/wmi/wmiopticaldisc.cpp View Diff

--===============1990592289250090575==--