John Levon <[EMAIL PROTECTED]> writes: | On Tue, Dec 10, 2002 at 08:48:02PM +0100, Lars Gullik Bjønnes wrote: | | > | +#include <map> | > | + | > | +#include "encoding.h" | > | #include "lyxfont.h" | > | | > | #include <qfont.h> | > | > include order | | I have never been able to work out what you wanted with these, and I | never understood your summary
basically most special/general to least special/general. | why not save some memory ? | > | - font_info const * fi = |fontinfo_[f.family()][f.series()][f.realShape()][f.size()]; | > | + font_info * fi = | > | fontinfo_[f.family()][f.series()][f.realShape()][f.size()]; | > | > And why cannot these be left const? | | Because we have to modify the std::map not if you change the ... | > | if (!fi) { | > | fi = new font_info(f); | > | > and give this one its own variable. (I hate double usage) | | I thought you hated duplicate code That ain't doplicated code. | > | +int charwidth(Uchar val, LyXFont const & f) | > | +{ | > | + return fontloader.charwidth(f, val); | > | +} | > | > Where did the short (Hu! Why! Anything special going on here?) go? | | This one isn't store I'd say that unless you have a very good reason, go with int. If you can show that this takes unduly amounts of memory then it can be changed. -- Lgb