KConfigIniBackend::stringToPrintable optimization patch
Alex Merry
kde at randomguy3.me.uk
Fri May 29 23:55:20 BST 2009
On Friday 29 May 2009 09:41:38 Mirko Boehm wrote:
> > please use
> > char *variable = ...
>
> It is a character pointer, that is the type of the variable. It is not
> a character that happens to be pointing to something. So it should be
> char* var, not char *var. The latter structure requires you to read
> the whole statement, only to figure out that the first thing you
> understood (char) was wrong.
While that is what sanity would dictate, it is not how the language is
defined. In C and C++, the * is attached to the variable name, not the type.
Using
char* variable;
instead of
char *variable;
suggests that
char* a, b;
will give you two pointers, rather than one pointer and one char.
So, yes, chalk it down to a quirk of C, inherited by C++.
Alex
--
Why have I got six monitors? Because I haven't got room for eight.
-- Terry Pratchett
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20090529/fa2668e0/attachment.sig>
More information about the kde-core-devel
mailing list