Ticket #10704: property_tree.patch

File property_tree.patch, 1.2 KB (added by Eduard Eduardov <eduardov.eduard@…>, 8 years ago)
  • include/boost/property_tree/ini_parser.hpp

    From aead1d7e86d135885557d419b3afbfed16c2a2a2 Mon Sep 17 00:00:00 2001
    From: Eduardov Eduard <eduardov.eduard@nicetu.spb.ru>
    Date: Tue, 28 Oct 2014 15:02:41 +0300
    Subject: [PATCH] Improved readability of written ini files by adding spaces
     between keys and values and newlines between sections.
    
    ---
     include/boost/property_tree/ini_parser.hpp | 3 ++-
     1 file changed, 2 insertions(+), 1 deletion(-)
    
    diff --git a/include/boost/property_tree/ini_parser.hpp b/include/boost/property_tree/ini_parser.hpp
    index d2a457f..7e91a7c 100644
    a b namespace boost { namespace property_tree { namespace ini_parser  
    249249                    if (!it2->second.empty())
    250250                        BOOST_PROPERTY_TREE_THROW(ini_parser_error(
    251251                            "ptree is too deep", "", 0));
    252                     stream << it2->first << Ch('=')
     252                    stream << it2->first << Ch(' ') << Ch('=') << Ch(' ')
    253253                        << it2->second.template get_value<
    254254                            std::basic_string<Ch> >()
    255255                        << Ch('\n');
    256256                }
     257                stream << Ch('\n');
    257258            }
    258259        }
    259260