Changeset 6ac84d8 for app/src/lib/word.cc
- Timestamp:
- 05/09/08 12:42:32 (17 years ago)
- Branches:
- master, help
- Children:
- 19760ef
- Parents:
- 3748bd1
- git-author:
- obrebski <obrebski@…> (05/09/08 12:42:32)
- git-committer:
- obrebski <obrebski@…> (05/09/08 12:42:32)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
app/src/lib/word.cc
rac7d970 r6ac84d8 16 16 lemd[i]='\0'; 17 17 if(isdigit(lemd[0])) 18 fullform(f,lemd,l); // je ¶li lemat zakodowany18 fullform(f,lemd,l); // je¶li lemat zakodowany 19 19 else 20 strcpy(l,lemd); // je ¶li lemat w pe³nej postaci20 strcpy(l,lemd); // je¶li lemat w pe³nej postaci 21 21 strcpy(d,de+i+1); 22 22 } … … 25 25 bool Word::cmp_w(Word a, Word b) { 26 26 return (a.w_suf() > b.w_suf()); 27 } 28 //--------------------------------------------------------------------------- 29 bool Word::cmp_w_rev(Word a, Word b) { 30 return (a.w_suf() < b.w_suf()); 31 } 32 //--------------------------------------------------------------------------- 33 bool cmp_w_fun(Word a, Word b) { 34 return (a.w_suf() > b.w_suf()); 35 } 36 //--------------------------------------------------------------------------- 37 bool cmp_w_rev_fun(Word a, Word b) { 38 return (a.w_suf() < b.w_suf()); 27 39 } 28 40 //--------------------------------------------------------------------------- … … 110 122 void Words::sort() { 111 123 std::sort(tab.begin(), tab.end(), Word::cmp_w); 124 } 125 126 //--------------------------------------------------------------------------- 127 void Words::sort_rev() { 128 std::sort(tab.begin(), tab.end(), cmp_w_rev_fun); 112 129 } 113 130
Note: See TracChangeset
for help on using the changeset viewer.