Re: small clean-up proposal

2003-07-16 Thread Lars Gullik Bjønnes
John Levon <[EMAIL PROTECTED]> writes: | On Wed, Jul 16, 2003 at 02:21:49PM +0200, Lars Gullik Bj?nnes wrote: | | > We have a compare function in lyx::support for this. lstrings.h | | This all seems a lot of hassle for something that's only calleld a few | times and doesn't show up in the profil

Re: small clean-up proposal

2003-07-16 Thread John Levon
On Wed, Jul 16, 2003 at 02:21:49PM +0200, Lars Gullik Bj?nnes wrote: > We have a compare function in lyx::support for this. lstrings.h This all seems a lot of hassle for something that's only calleld a few times and doesn't show up in the profiles john

Re: small clean-up proposal

2003-07-16 Thread Lars Gullik Bjønnes
Angus Leeming <[EMAIL PROTECTED]> writes: | Lars Gullik Bjønnes wrote: | > | struct CompareKey { | > | bool operator()(XPMmap const & lhs, XPMmap const & rhs) { | > | return strcmp(lhs.key, rhs.key) < 0; | > | } | > | > | bool operator()(XPMmap const & lhs,

Re: small clean-up proposal

2003-07-16 Thread Angus Leeming
Lars Gullik Bjønnes wrote: > | struct CompareKey { > | bool operator()(XPMmap const & lhs, XPMmap const & rhs) { > | return strcmp(lhs.key, rhs.key) < 0; > | } > > | bool operator()(XPMmap const & lhs, string const & rhs) { > | return strcmp(

Re: small clean-up proposal

2003-07-16 Thread Lars Gullik Bjønnes
Angus Leeming <[EMAIL PROTECTED]> writes: | #include | #include | | using std::string; | | | namespace { | | struct XPMmap { | char const * key; | char const * value; | }; | | | struct CompareKey { | bool operator()(XPMmap const & lhs, XPMmap const & rhs) { |

Re: small clean-up proposal

2003-07-16 Thread Angus Leeming
Lars Gullik Bjønnes wrote: > Angus Leeming <[EMAIL PROTECTED]> writes: > > | Lars, you have posted the following warning in > | controllers/ControlMath.C: > | > | string const find_xpm(string const & name) > | { > | #warning Use a static table for this (Lgb) > | // And get O(log n) looku

Re: small clean-up proposal

2003-07-15 Thread Lars Gullik Bjønnes
Angus Leeming <[EMAIL PROTECTED]> writes: | Lars, you have posted the following warning in | controllers/ControlMath.C: | | string const find_xpm(string const & name) | { | #warning Use a static table for this (Lgb) | // And get O(log n) lookup (Lgb) | | string xpm_name = subst(

small clean-up proposal

2003-07-15 Thread Angus Leeming
Lars, you have posted the following warning in controllers/ControlMath.C: string const find_xpm(string const & name) { #warning Use a static table for this (Lgb) // And get O(log n) lookup (Lgb) string xpm_name = subst(name, ' ', '_'); if (xpm_name == "(") xpm_name = "lpa