[devel] [PATCH for apt 01/38] Replace post-increments with pre-increments

Aleksei Nikiforov darktemplar на altlinux.org
Ср Дек 11 10:51:03 MSK 2019


10.12.2019 21:21, Alexey Tourbin пишет:
> On Tue, Dec 10, 2019 at 6:25 PM Aleksei Nikiforov
> <darktemplar на altlinux.org> wrote:
>> +++ b/apt/apt-pkg/acquire-item.cc
>> @@ -486,7 +486,7 @@ void pkgAcqIndexRel::Done(const string &Message,unsigned long long Size,const st
>>
>>           bool found = false;
>>           for (vector<string>::const_iterator I = Repository->FingerPrint.begin();
>> -             I != Repository->FingerPrint.end(); I++)
>> +             I != Repository->FingerPrint.end(); ++I)
>>           {
>>              // Match fingerprint of Release file
>>              if ((*I) == FingerPrint)
> 
> How does that fix anything? It doesn't! Avoid unnecessary changes,
> only make those beaming with thought.  As Pouchkine wrote, "strashisya
> uchasti bessmyslennykh pevtsov".

You're right, but not the way you think you are :)

In order for this fix to matter, signature of operator++ should be fixed 
as well. Currently it's not a standard, and returns not an object copy 
or reference to object, but returns void. I'll fix it too and this 
change would matter :)

> _______________________________________________
> Devel mailing list
> Devel на lists.altlinux.org
> https://lists.altlinux.org/mailman/listinfo/devel
> 


Подробная информация о списке рассылки Devel