Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rowlo/8218194 to your computer and use it in GitHub Desktop.
Save rowlo/8218194 to your computer and use it in GitHub Desktop.
Reverse QList one-line with max and size initialization
for(int k=0, s=list.size(), max=(s/2); k<max; k++) list.swap(k,s-(1+k));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment