yakra / DataProcessing

Data Processing Scripts and Programs for Travel Mapping Project
0 stars 0 forks source link

maps, sets & sorting #227

Open yakra opened 2 years ago

yakra commented 2 years ago

Converting unordered_maps & unordered_sets to maps & sets (related: #216) can eliminate the need to sort existing containers. Vectors can be sorted using std::sort. Use lambdas where comparators aren't reused.

Functions:

functions=$(\
  grep -h -m 1 'sort_[a-z_]*' `find . -name \*.cpp`\
  | sed -e 's~.*\(sort_.*\)[()].*~\1~' -e 's~(.*~~'\
  | sort | uniq)
echo -e "$functions\n"

for f in $functions; do
  grep -n $f `find . -name \*.cpp`; echo
done