casting away const in comparators

Поиск
Список
Период
Сортировка
Искать

casting away const in comparators

От:
Mark Dilger <hornschnorter@gmail.com>
Дата:
Вложения:
Friends,

comparators usually take arguments like

  (const void *a, const void *b)

and do something read-only to a and b.  In our
sources, we typically cast these to something else,
like (char *), and do something read-only.  This 
generates a lot of warnings if using -Wcast-qual.
To fix that, I have converted the casts to not cast
away const.  Please find my changes, attached.

Mark Dilger

FAQ