From: Dan F. <dfa...@us...> - 2009-11-08 06:59:22
|
Update of /cvsroot/libexif/libexif/libexif In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv14891/libexif Modified Files: exif-format.c Log Message: Sorted ExifFormatTable[] in approximate decreasing order of popularity to decrease the total average lookup time. Index: exif-format.c =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/exif-format.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -p -d -r1.18 -r1.19 --- exif-format.c 27 Oct 2009 06:06:11 -0000 1.18 +++ exif-format.c 8 Nov 2009 06:59:07 -0000 1.19 @@ -25,23 +25,27 @@ #include <stdlib.h> +/*! Table of data format types, descriptions and sizes. + * This table should be sorted in decreasing order of popularity in order + * to decrease the total average lookup time. + */ static const struct { ExifFormat format; const char *name; unsigned char size; } ExifFormatTable[] = { - {EXIF_FORMAT_BYTE, N_("Byte"), 1}, - {EXIF_FORMAT_ASCII, N_("ASCII"), 1}, {EXIF_FORMAT_SHORT, N_("Short"), 2}, - {EXIF_FORMAT_LONG, N_("Long"), 4}, {EXIF_FORMAT_RATIONAL, N_("Rational"), 8}, + {EXIF_FORMAT_SRATIONAL, N_("SRational"), 8}, + {EXIF_FORMAT_UNDEFINED, N_("Undefined"), 1}, + {EXIF_FORMAT_ASCII, N_("ASCII"), 1}, + {EXIF_FORMAT_LONG, N_("Long"), 4}, + {EXIF_FORMAT_BYTE, N_("Byte"), 1}, {EXIF_FORMAT_SBYTE, N_("SByte"), 1}, {EXIF_FORMAT_SSHORT, N_("SShort"), 2}, {EXIF_FORMAT_SLONG, N_("SLong"), 4}, - {EXIF_FORMAT_SRATIONAL, N_("SRational"), 8}, {EXIF_FORMAT_FLOAT, N_("Float"), 4}, {EXIF_FORMAT_DOUBLE, N_("Double"), 8}, - {EXIF_FORMAT_UNDEFINED, N_("Undefined"), 1}, {0, NULL, 0} }; |