Georg Baum <[EMAIL PROTECTED]> writes:

|       * LaTeXFeatures.C (getPackages): solve amsmath-wasysym conflict
| Index: src/LColor.C
| ===================================================================
| RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/LColor.C,v
| retrieving revision 1.55
| diff -u -p -r1.55 LColor.C
| --- src/LColor.C      19 Jan 2005 15:03:27 -0000      1.55
| +++ src/LColor.C      14 Jun 2005 09:58:47 -0000
| @@ -66,7 +66,8 @@ public:
|               in.x11name   = string(entry.x11name);
|               in.guiname   = string(entry.guiname);
|               infotab[entry.lcolor] = in;
| -             transform[string(entry.lyxname)] = int(entry.lcolor);
| +             LyXTransform[string(entry.lyxname)] = int(entry.lcolor);
| +             LaTeXTransform[string(entry.latexname)] = int(entry.lcolor);
|       }
|  
|       ///
| @@ -75,8 +76,10 @@ public:
|       InfoTab infotab;
|  
|       typedef std::map<string, int> Transform;

Hmm Why do we store int in the map again?

| -     /// the transform between colour name string and integer code.
| -     Transform transform;
| +     /// the transform between LyX color name string and integer code.
| +     Transform LyXTransform;
| +     /// the transform between LaTeX color name string and integer code.
| +     Transform LaTeXTransform;

You variable names stink. :-)

Probalby a std::map shouldn't be used for this at all.

Basically what we have is a 

          { lyxname, latename, lcolor }  structs.

So these could be stored in a vector (why not... it is not like there
are hundreds of colors).

This lib would be nice for stuff like this:
http://www.boost.org/libs/multi_index/doc/index.html

-- 
        Lgb

Reply via email to