Add type checking to swap macros
authorMatt Turner <mattst88@gmail.com>
Tue, 16 Aug 2011 23:07:24 +0000 (19:07 -0400)
committerMatt Turner <mattst88@gmail.com>
Wed, 21 Sep 2011 21:14:44 +0000 (17:14 -0400)
commite8ff555b95baab66cc7d060c1e7f9fdd49d3802f
tree57ddccb2f63e652207899e441a52462a8b50d039
parent893e86a49e3e381cff48a9e86dc2d9b3d5431d95
Add type checking to swap macros

The original macros are retained (instead of replacing them with inline
functions) because of implicit type promotion. That is, an int16 passed
to an inline function taking int32 would be implicitly promoted to int32
without a warning.

Reviewed-by: Peter Harris <pharris@opentext.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
include/misc.h