Archive for 27. November 2006

Re: Re: Item 42: Don’t give away your internals… ;-)
Hi Peter my comments in bold ;-) Peter Dimov wrote: Hi Atul, I happen to have a copy of C++ Coding Style and looked at Item 42. The summary says: “Don't volunteer too much: Avoid (more...)
Re: Item 42: Don’t give away your internals… ;-)
Hi Atul, I happen to have a copy of C++ Coding Style and looked at Item 42. The summary says: “Don't volunteer too much: Avoid returning handles to internal data managed (more...)
Re: Re: SourceComment: Declare variable nearest to its first use
Dear Peter, Good mate, I used to use this style a lot in traversing some complex linked list code and it never failed me ;-) Will send a patch sometime today... --- cheerio (more...)
Item 42: Don’t give away your internals… ;-)
Dear all C++ Coding Standards by Herb  Sutter and Andrei Alexandrescu have this important guideline... Much of our code seems to violate this... ( I think we briefly discussed this ). (more...)
Re: SourceComment: Declare variable nearest to its first use
Yes Atul, I totally agree with you! You have a patch for that already? Regards, Peter atul wrote:Dear all I saw this style in Lippman's C++ book const PackedHostCaches * PackedHostCaches::findIn (const GgepBlock &ggepBlock) { (more...)
Re: Re: Re: SourceComment: Removing code duplication in BinaryWriter
Dear Atul, I see you are thinking of BinaryReader/BinaryWriter as kind of stream classes. When I created them my intention was NOT that they become another QDataStream. Let me summarize my (more...)
SourceComment: Declare variable nearest to its first use
Dear all I saw this style in Lippman's C++ book const PackedHostCaches * PackedHostCaches::findIn (const GgepBlock &ggepBlock) {     const PackedHostCaches *res = 0; foreach (const Ggep *extension, ggepBlock.extensions()) {         res = dynamic_cast (more...)
Re: Re: SourceComment: Removing code duplication in BinaryWriter
Dear Peter In bold ;-) Peter Dimov wrote: Dear Atul, I looked into your patch and I see two issues with using the template function. The major one is that the template function would allow (more...)