SourceComment: BDecoder::readInt()

Dear all

Why not use

int QByteArray::toInt() and leave all the processing to it? ;-)

I mean we could write a BinaryReader::toInt() wrapper and that could just call the QByteArray version….

So there would be a lot of less code to maintain ( and more reuse etc… )

Could the same ideas be used for BDecoder::readString?

I think I will write another SourceComment for that ;-)

—- cheerio atul

Would you like to post a relpy?


This post starts a thread.
Follow-ups:
Re: SourceComment: BDecoder::readInt()
Hi Atul, the thing is that with integers we might need to swap bytes whereas readBytes() and readCString() should never swap bytes. Or maybe I got you wrong? Peter atul wrote:Dear all Why (more...)