Changeset 1232 for cpp/frams/genetics/f4/f4_general.cpp
- Timestamp:
- 05/02/23 17:12:24 (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified cpp/frams/genetics/f4/f4_general.cpp ¶
r1231 r1232 795 795 } 796 796 797 void f4_Cells::setRepairRemove(int nerrpos, f4_Node *rem) 798 { 797 void f4_Cells::setRepairRemove(int nerrpos, f4_Node *to_remove) 798 { 799 errorcode = GENOPER_REPAIR; 800 errorpos = nerrpos; 799 801 if (!repair) 800 802 { 801 803 // not in repair mode, treat as repairable error 802 errorcode = GENOPER_REPAIR;803 errorpos = nerrpos;804 804 } 805 805 else 806 806 { 807 errorcode = GENOPER_REPAIR;808 errorpos = nerrpos;809 repair_remove = rem; 810 } 811 } 812 813 int f4_Cells::setRepairInsert(int nerrpos, f4_Node *parent, f4_Node *insert) 814 { 807 repair_remove = to_remove; 808 } 809 } 810 811 int f4_Cells::setRepairInsert(int nerrpos, f4_Node *parent, f4_Node *to_insert) 812 { 813 errorcode = GENOPER_REPAIR; 814 errorpos = nerrpos; 815 815 if (!repair) 816 816 { 817 817 // not in repair mode, treat as repairable error 818 errorcode = GENOPER_REPAIR;819 errorpos = nerrpos;820 818 return -1; 821 819 } 822 820 else 823 821 { 824 errorcode = GENOPER_REPAIR;825 errorpos = nerrpos;826 822 repair_parent = parent; 827 repair_insert = insert;823 repair_insert = to_insert; 828 824 return 0; 829 825 } … … 1423 1419 int res = f4_processRecur(genot, pos, root); 1424 1420 if (res > 0) 1425 return res; //error 1426 else if (genot[pos] == 0) //parsed until the end - OK! 1427 return 0; 1428 else return pos + 1; //junk, unparsed genes after successful parsing, for example /*4*/<X>N:N>whatever or /*4*/<X>X>>> 1421 return res; //parsing error 1422 else if (genot[pos] != 0) 1423 return pos + 1; //parsing OK but junk, unparsed genes left, for example /*4*/<X>N:N>whatever or /*4*/<X>X>>> 1424 else 1425 return 0; //parsing OK and parsed until the end 1429 1426 } 1430 1427
Note: See TracChangeset
for help on using the changeset viewer.