MCPcopy Create free account
hub / github.com/ON4QZ/QSSTV / deleteSyncArrayEntry

Method deleteSyncArrayEntry

src/sstv/syncprocessor.cpp:844–894  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

842}
843
844void syncProcessor::deleteSyncArrayEntry(uint entry)
845{
846 int i,j,k;
847 modeMatchList *ml;
848 // smatchEntry *tempPtr;
849 if(entry>=syncArrayIndex) return;
850 // delete or adapt the matchArrays
851 for(i=idxStart;i<=idxEnd;i++) //all modes
852 {
853 for(j=0;j<matchArray[i].count();) //all chains
854 {
855 for(k=0;k<matchArray[i][j]->count();)
856 {
857 ml=matchArray[i][j];
858 if (ml->at(k)->from==entry)
859 {
860 delete matchArray[i][j]->takeAt(k);
861 }
862 else
863 {
864 if(ml->at(k)->from>entry)
865 {
866 ml->at(k)->from--;
867 }
868 if(ml->at(k)->to>entry)
869 {
870 ml->at(k)->to--;
871 }
872 k++;
873 }
874 }
875 if(matchArray[i][j]->count()==0)
876 {
877 if(activeChainPtr==matchArray[i][j])
878 {
879 activeChainPtr=NULL;
880 }
881 delete matchArray[i].takeAt(j);
882 }
883 else
884 {
885 j++;
886 }
887 }
888 }
889 for(i=entry;i<(int)syncArrayIndex;i++)
890 {
891 syncArray[i]=syncArray[i+1];
892 }
893 syncArrayIndex--;
894}
895
896
897/**

Callers

nothing calls this directly

Calls 2

countMethod · 0.80
atMethod · 0.80

Tested by

no test coverage detected