Changeset 6141 for trunk/NTREE/NT_dbrepair.cxx
- Timestamp:
- 14/08/09 16:29:27 (3 years ago)
- Files:
-
- 1 modified
-
trunk/NTREE/NT_dbrepair.cxx (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/NTREE/NT_dbrepair.cxx
r6019 r6141 295 295 GBDATA *gb_pos_begin = GB_entry(gb_gene, "pos_begin"); // test for old format 296 296 if (!gb_pos_begin) { 297 error = "Nei ghter 'pos_begin' nor 'pos_start' found - format of gene location is unknown";297 error = "Neither 'pos_begin' nor 'pos_start' found - format of gene location is unknown"; 298 298 } 299 299 } … … 810 810 811 811 DictMap use; // keyname -> dictionary (which dictionary to use) 812 StringSet multiDecompress able; // keys which can be decompressed with multiple dictionaries812 StringSet multiDecompressible; // keys which can be decompressed with multiple dictionaries 813 813 814 814 for (int pass = 1; pass <= 2; ++pass) { … … 831 831 } 832 832 else { // already have another dictionary working with keyname 833 multiDecompress able.insert(keyname);833 multiDecompressible.insert(keyname); 834 834 } 835 835 } … … 842 842 } 843 843 844 StringSet notDecompress able; // keys which can be decompressed with none of the dictionaries844 StringSet notDecompressible; // keys which can be decompressed with none of the dictionaries 845 845 for (Keys::iterator ki = keys.begin(); ki != keys.end(); ++ki) { 846 846 KeyInfoPtr k = ki->second; … … 848 848 849 849 if (k->isCompressed()) { 850 if (!contains(use, keyname)) notDecompress able.insert(keyname);851 if (contains(multiDecompress able, keyname)) use.erase(keyname);850 if (!contains(use, keyname)) notDecompressible.insert(keyname); 851 if (contains(multiDecompressible, keyname)) use.erase(keyname); 852 852 } 853 853 } … … 856 856 int reassigned = 0; 857 857 858 if (!notDecompress able.empty()) {859 // bad .. found undecompress able data860 int nd_count = notDecompress able.size();858 if (!notDecompressible.empty()) { 859 // bad .. found undecompressible data 860 int nd_count = notDecompressible.size(); 861 861 aw_message(GBS_global_string("Detected corrupted dictionary compression\n" 862 862 "Data of %i DB-keys is lost and will be deleted", nd_count)); … … 870 870 long notDeleted = 0; 871 871 872 for (StringSet::iterator ki = notDecompress able.begin(); !error && ki != notDecompressable.end(); ++ki) {872 for (StringSet::iterator ki = notDecompressible.begin(); !error && ki != notDecompressible.end(); ++ki) { 873 873 const string& keyname = *ki; 874 874 … … 890 890 } 891 891 892 if (!error && !multiDecompress able.empty()) {893 for (StringSet::iterator ki = multiDecompress able.begin(); !error && ki != multiDecompressable.end(); ++ki) {892 if (!error && !multiDecompressible.empty()) { 893 for (StringSet::iterator ki = multiDecompressible.begin(); !error && ki != multiDecompressible.end(); ++ki) { 894 894 const string& keyname = *ki; 895 895 int possible = 0; … … 946 946 } 947 947 948 // now all redund encies should be eliminated and we can assign dictionaries to affected keys948 // now all redundancies should be eliminated and we can assign dictionaries to affected keys 949 949 if (!error) { 950 950 for (Keys::iterator ki = keys.begin(); !error && ki != keys.end(); ++ki) {
