Re: Const qualifier conversion warnings
Re: Const qualifier conversion warnings
- Subject: Re: Const qualifier conversion warnings
- From: "Theodore H. Smith" <email@hidden>
- Date: Fri, 3 Jun 2005 20:22:56 +0100
I did that before, and then decided against it because of the amount
of work it was requiring from me.
I declare Left as const, but then Left calls another function to do
it's work. So that needs to be defined const too. But then that
function also calls other functions, and soon enough I'm having to
rework my entire class, that was already totally valid, simply
because of a complaining compiler.
I see a compilers job as to be making my job easier. I know when code
is correct or not, and I know that that code is correct at least as
far as constness goes, so I'd like to be able to tell the compiler to
not make my job harder by complaining about stuff that's fine.
To: "Theodore H. Smith" <email@hidden>
Cc: email@hidden
Message-ID: <email@hidden>
Content-Type: text/plain; charset=US-ASCII; format=flowed
On Jun 3, 2005, at 8:08 AM, Theodore H. Smith wrote:
How do I disable Xcode from telling me about converting to/from
const?
I find this a really time consuming thing to fix, because consts
generally spread throughout my code. As I make one function const, so
it requires me to make the functions it calls consts, and before long
I'm having to totally redesign all of my code for const compliance.
It's much easier to just not have anything as const, even if it
really
is a const. I've been developnig software in C for many years now,
and
I've never had a problem with me calling a function that overwrites
stuff that it shouldn't because the data should have been const...
So how do I disable this warning?
I find this a really odd request.
Rather than just do the Right Thing and use const as it is intended
and
write your code so that the compiler can help you make fewer mistakes,
you purposely want to lobotomize the compiler because you've been
developing for years and never had a problem? (that you know of :)
I dunno, but it seems the easier AND right thing to do is to simply
use
const correctly in your code. <shrug> Certainly makes for better long
term code with respect to correctness and readability.
--
http://elfdata.com/plugin/ Industrial strength string processing,
made easy.
"All things are logical. Putting free-will in the slot for premises in
a logical system, makes all of life both understandable, and free."
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden