Review: Config.roles data storage is map


Jeremy Selan <jeremy...@...>
 

The list of defined roles within a config previously maintained order.
Conceptually, this is actually a mapping type where order does not
matter (and the yaml serialization dropped ordering). This switches
the underlying storage to use a map instead.

Commits:
3942e6d8bd72b721b23d3e9991e434f2537a2759


Malcolm Humphreys <malcolmh...@...>
 

LGTM

I'm pretty sure yaml-cpp supports std::map serialization does the following work?
sorry I can't test this myself.

--snip--
            // Roles
            if(m_impl->roles_.size() > 0)
            {
                out << YAML::Newline;
                out << YAML::Key << "roles" << YAML::Value;
               
out << YAML::Value << m_impl->roles_; // std::map -> Map
            }
--snip--

.malcolm

On 10 Nov, 2010,at 11:22 AM, Jeremy Selan <jere...@...> wrote:

The list of defined roles within a config previously maintained order.
Conceptually, this is actually a mapping type where order does not
matter (and the yaml serialization dropped ordering). This switches
the underlying storage to use a map instead.

Commits:
3942e6d8bd72b721b23d3e9991e434f2537a2759


Jeremy Selan <jeremy...@...>
 

Yup, sending the map directly to the yaml stream works great.
Thanks.

-- Jeremy

On Thu, Nov 11, 2010 at 4:38 PM, Malcolm Humphreys
<malcolmh...@mac.com> wrote:
LGTM

I'm pretty sure yaml-cpp supports std::map serialization does the following
work?
sorry I can't test this myself.

--snip--
            // Roles
            if(m_impl->roles_.size() > 0)
            {
                out << YAML::Newline;
                out << YAML::Key << "roles" << YAML::Value;
                out << YAML::Value << m_impl->roles_; // std::map -> Map
            }
--snip--

.malcolm

On 10 Nov, 2010,at 11:22 AM, Jeremy Selan <jerem...@gmail.com> wrote:

The list of defined roles within a config previously maintained order.
Conceptually, this is actually a mapping type where order does not
matter (and the yaml serialization dropped ordering). This switches
the underlying storage to use a map instead.

Commits:
3942e6d8bd72b721b23d3e9991e434f2537a2759