SourceComment: BinaryReader::readBytes

Dear all

Peer code review is critical ( getting somebody else to look at your code works wonders for its quality ;-)

So in addition to what we are doing, take a moment or two and look at some code which you are not working on… and posting those here would work very well

I propose putting a SourceComment: so everybody knows what this is all about ;-)

Okay so here it goes …

    char* destination = res.data();

      while ( start != end )

                 *destination++ = *start++;

qcopy( start, end, res.data()  );

so three lines shrunk to one ;-)

Let me know if I am wrong ( I was inspired by std::copy ;-)

– cheerio atul

Would you like to post a relpy?


This post starts a thread.
Follow-ups:
Re: SourceComment: BinaryReader::readBytes
Hi Atul, Thanks for the suggestion. It’s always better to use a standard function do the job. The code is simpler and more readable. Let’s use the SourceComment marker as (more...)