Re: Re: Re: Re: BDecoder - ready

Hi Peter,

I did all the changes, thanks once again for the extensive check. Look once again in the BDecoder::readList and BDecoder::readDictionary functions. The created bList and bDict objects had to be deleted too in case of an error. I hope that there is nothing else forgotten there this time :).

I additionaly apply the binary torrent files neesed for the tests. I didn’t notice that they are not included in the patch so thats why i upload them now. They should be copied to Testing\Protocols\BitTorrent\Torrents.

Thanks once again for the hints.

Slavcho

Peter Dimov wrote:

Hi Slavcho,

Thanks for the prompt reply and fixes! I’m going only through the points for which I have comments:

Thanks for the clarification about len_pow_10. Now I get it, clever ;-) Maybe you could write a few words about that inline with the code or in the function documentation header?

BDecoder::readDictionary() in the if where you return new BErrorItem();, just noticed that value must be deleted as well. I missed that the first time ;-).

For BDictionary I think we are better off with a key of type QByteArray instead of QString. The user of the class would have the choice to perform any required conversions of the raw string bytes. Would you change that please?

One last, I hope, thing. Can you please rearrange the declarations in BItem so that they are in order of visibility (public first, then protected, then private). I have to check whether I have that in the coding conventions ;-).

If nobody else reports anything I’ll commit you next patch.

Regards,

Peter

Would you like to post a relpy?


This post is a reply to:
Re: Re: Re: BDecoder - ready
Hi Slavcho, Thanks for the prompt reply and fixes! I’m going only through the points for which I have comments: Thanks for the clarification about len_pow_10. Now I get it, clever ;-) (more...)

Follow-ups:
Re: BDecoder - ready
Hi, I am new to this project to checkout code so I started out looking at your code but do not have the full picture yet so bare with me if (more...)