Replaced for-cycle to std::transform in generateCross function

This commit is contained in:
2015-06-15 19:50:37 +03:00
parent 7f85add918
commit 83bdef4bfa
2 changed files with 9 additions and 4 deletions

View File

@@ -248,9 +248,14 @@ void generateCross(GridType &grid, const DictType &dict, std::vector<wxString> &
std::reverse(words_trans_out.begin(), words_trans_out.end());
BackedCharsTransType bctt = getFromCharsTransed(trans_type);
words_out.clear();
for (auto it = words_trans_out.begin(); it != words_trans_out.end(); ++it){
words_out.push_back(getFromTransed(*it, bctt));
words_out.resize(words_trans_out.size());
std::transform(
words_trans_out.begin(),
words_trans_out.end(),
words_out.begin(), [bctt](const TransedWord &tw){
return getFromTransed(tw, bctt);
}
);
}
#endif // CROSSGEN_HPP

View File

@@ -13,7 +13,7 @@ CurrentFileName :=
CurrentFilePath :=
CurrentFileFullPath :=
User :=Aleksey Lobanov
Date :=14/06/15
Date :=15/06/15
CodeLitePath :="/home/alex/.codelite"
LinkerName :=/usr/bin/g++-4.8
SharedObjectLinkerName :=/usr/bin/g++-4.8 -shared -fPIC