[poppler] poppler/CachedFile.cc
Pino Toscano
pino at kde.org
Wed Apr 7 12:37:19 PDT 2010
Alle mercoledì 7 aprile 2010, Hib Eris ha scritto:
> Thank you for improving my code. Just a question: I see you are using
> 'bool'. Often I see the use of 'gBool' in poppler's code. What is
> preferred in poppler?
The preferred should be GBool; in that vector, I chose bool instead of
GBool as sizeof(bool) == 1, while sizeof(GBool) == 4 (as it's a typedef
of int), so using GBool for a simple "visited" list is a kind of memory
waste, IMHO. (Note that using std::vector<bool> would be even more
efficient, as it would use a bitarray-like list for the items, so at
most (N/8)+1 bytes for N items.)
PS: no need to CC me directly, I'm subscribed to the ml.
--
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20100407/b14396f7/attachment.pgp>
More information about the poppler
mailing list