More interfaces to the int array compression routines.

* src/misc/intvcomp.cc, src/misc/intvcomp.cc: Add interfaces to
compress vector<int> to vector<unsigned>.
* src/tgbatest/intvcomp.cc: Test them.
* src/sanity/style.test: Refine check to avoid a spurious report.
This commit is contained in:
Alexandre Duret-Lutz 2011-04-12 11:44:53 +02:00
parent 3aa9c3bab6
commit 1b447c3676
5 changed files with 187 additions and 3 deletions

View file

@ -165,7 +165,7 @@ for dir in "${INCDIR-..}" "${INCDIR-..}"/../iface; do
egrep '(->|[.])size\(\) [=!]= 0|![a-zA-Z0-9_]*(->|[.])size\(\)|(if |while |assert)\([a-zA-Z0-9_]*(->|[.])size\(\)\)' $tmp &&
diag 'Prefer empty() to check emptiness.'
egrep '^[^=]*([+][+]|--);' $tmp &&
egrep '^[^=*]*([+][+]|--);' $tmp &&
diag 'Take good habits: use ++i instead of i++ when you have the choice.'
grep '[^a-zA-Z0-9_](\*[a-zA-Z0-9_]*)\.' $tmp &&