<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -65,7 +65,7 @@ namespace agave
     {
         public:
             SavedSetParser () :
-                m_active_elements (0)
+                m_active_element_bitfield (0)
             {}
 
             virtual void
@@ -75,7 +75,7 @@ namespace agave
             {
                 try
                 {
-                    m_active_elements |= m_element_map[element_name];
+                    m_active_element_bitfield |= s_element_bitmap.at (element_name);
                 }
                 catch (const std::out_of_range&amp;)
                 {
@@ -123,7 +123,7 @@ namespace agave
             {
                 try
                 {
-                    m_active_elements &amp;= ~m_element_map[element_name];
+                    m_active_element_bitfield &amp;= ~s_element_bitmap.at (element_name);
                 }
                 catch (const std::out_of_range&amp;)
                 {
@@ -153,19 +153,20 @@ namespace agave
             {
                 // fixme: these text elements probably need to be trimmed for
                 // whitespace / newlines
-                if ((m_active_elements &amp; m_element_map[ELEMENT_NAME]) &amp;&amp; !text.empty ())
+                if ((m_active_element_bitfield &amp; s_element_bitmap.at (ELEMENT_NAME)) &amp;&amp; !text.empty ())
                 {
                     m_working_set.set_name (text);
                 }
-                else if ((m_active_elements &amp; m_element_map[ELEMENT_DESCRIPTION]) &amp;&amp; !text.empty ())
+                else if ((m_active_element_bitfield &amp; s_element_bitmap.at (ELEMENT_DESCRIPTION)) &amp;&amp; !text.empty ())
                 {
                     m_working_set.set_description (text);
                 }
-                else if ((m_active_elements &amp; m_element_map[ELEMENT_COLOR]) &amp;&amp;
-                         m_active_elements &amp; (m_element_map[ELEMENT_HUE]
-                                              | m_element_map[ELEMENT_SATURATION]
-                                              | m_element_map[ELEMENT_VALUE]
-                                              | m_element_map[ELEMENT_ALPHA]))
+                else if ((m_active_element_bitfield &amp; s_element_bitmap.at (ELEMENT_COLOR))
+                        &amp;&amp; (m_active_element_bitfield &amp;
+                            (s_element_bitmap.at (ELEMENT_HUE) |
+                             s_element_bitmap.at (ELEMENT_SATURATION) |
+                             s_element_bitmap.at (ELEMENT_VALUE) |
+                             s_element_bitmap.at (ELEMENT_ALPHA))))
                 {
                     std::istringstream stream (text);
                     double value = 0.0; // default to 0 if parsed value is invalid
@@ -175,19 +176,19 @@ namespace agave
                             &lt;&lt; Glib::ustring::compose (&quot;Invalid value for double type: '%1'&quot;, text)
                             &lt;&lt; std::endl;
                     }
-                    if ((m_active_elements &amp; m_element_map[ELEMENT_HUE]))
+                    if ((m_active_element_bitfield &amp; s_element_bitmap.at (ELEMENT_HUE)))
                     {
                         m_working_color.set_hue (value);
                     }
-                    else if ((m_active_elements &amp; m_element_map[ELEMENT_SATURATION]))
+                    else if ((m_active_element_bitfield &amp; s_element_bitmap.at (ELEMENT_SATURATION)))
                     {
                         m_working_color.set_saturation (value);
                     }
-                    else if ((m_active_elements &amp; m_element_map[ELEMENT_VALUE]))
+                    else if ((m_active_element_bitfield &amp; s_element_bitmap.at (ELEMENT_VALUE)))
                     {
                         m_working_color.set_value (value);
                     }
-                    else if ((m_active_elements &amp; m_element_map[ELEMENT_ALPHA]))
+                    else if ((m_active_element_bitfield &amp; s_element_bitmap.at (ELEMENT_ALPHA)))
                     {
                         m_working_color.set_alpha (value);
                     }
@@ -200,10 +201,10 @@ namespace agave
             }
 
         private:
-            class ElementMap : public std::map&lt;Glib::ustring, uint16_t&gt;
+            class ElementBitMap : public std::map&lt;Glib::ustring, uint16_t&gt;
             {
                 public:
-                    ElementMap ()
+                    ElementBitMap ()
                     {
                         unsigned int pos = 0;
                         insert (std::make_pair (ELEMENT_SETS, 1 &lt;&lt; pos++));
@@ -221,16 +222,16 @@ namespace agave
                     }
             };
 
-            uint16_t m_active_elements;
+            uint16_t m_active_element_bitfield;
             ColorSet m_working_set;
             std::list&lt;Color&gt; m_working_colors;
             Color m_working_color;
             std::list&lt;ColorSet&gt; m_parsed_sets;
 
-            static ElementMap m_element_map;
+            static const ElementBitMap s_element_bitmap;
     };
 
-    SavedSetParser::ElementMap SavedSetParser::m_element_map;
+    const SavedSetParser::ElementBitMap SavedSetParser::s_element_bitmap;
 
     ColorSetManager::ColorSetManager (std::string filename) :
         m_filename (filename)</diff>
      <filename>src/color-set-manager.cc</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>5ac196f73d072ff157e7fc111e6563261945f69c</id>
    </parent>
  </parents>
  <author>
    <name>Jonathon Jongsma</name>
    <email>jjongsma@gnome.org</email>
  </author>
  <url>http://github.com/jonner/agave2/commit/587349a0422fb6505a36800917f7becb482b0492</url>
  <id>587349a0422fb6505a36800917f7becb482b0492</id>
  <committed-date>2008-03-09T08:50:33-07:00</committed-date>
  <authored-date>2008-03-09T08:50:33-07:00</authored-date>
  <message>Rename m_element_map to s_element_bitmap to increase readability

Also changed it to a const static member, which meant that I had to change all
of the operator[] calls to at() since operator[] cannot be called on a const
object.</message>
  <tree>2d4471026fd312a85cae7e5400d51ed35c94e08e</tree>
  <committer>
    <name>Jonathon Jongsma</name>
    <email>jjongsma@gnome.org</email>
  </committer>
</commit>
