Mailinglist Archive: zypp-devel (58 mails)

< Previous Next >
[zypp-devel] Re: [zypp-commit] <sat-solver> master : evr doesn't change the Pool: more constness
  • From: Michael Matz <matz@xxxxxxx>
  • Date: Mon, 22 Jun 2009 16:53:30 +0200 (CEST)
  • Message-id: <Pine.LNX.4.64.0906221650450.29566@xxxxxxxxxxxxx>
Hi,

On Mon, 22 Jun 2009, Klaus Kämpf wrote:

evr doesn't change the Pool: more constness

Btw. all these const changes are useless in a way. I did much of this
myself six months ago, and then threw away most of it again. The reason
is that the compiler can't depend on const-ness (exactly because it can be
cast away) on pointers, so it ignores it. Hence you get exactly the same
code.

What you do get is warnings for changes through such const pointers, so
that is an argument for it, code cleanliness and documenting the intent.
But it's a relatively weak one.

Just wanted to mention it.


Ciao,
Michael.
< Previous Next >
This Thread
  • No further messages