Mercurial > code
changeset 580:6082ef1fa880
Ini: reduce column limit
author | David Demelier <markand@malikania.fr> |
---|---|
date | Wed, 20 Jul 2016 16:33:15 +0200 |
parents | 8523c9300c4c |
children | e7b311bfcaf1 |
files | modules/ini/ini.hpp |
diffstat | 1 files changed, 18 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/modules/ini/ini.hpp Wed Jul 20 16:28:52 2016 +0200 +++ b/modules/ini/ini.hpp Wed Jul 20 16:33:15 2016 +0200 @@ -31,8 +31,9 @@ * * ## Export macros * - * You must define `INI_DLL` globally and `INI_BUILDING_DLL` when compiling the library if you want a DLL, alternatively you can provide - * your own `INI_EXPORT` macro instead. + * You must define `INI_DLL` globally and `INI_BUILDING_DLL` when compiling the + * library if you want a DLL, alternatively you can provide your own + * `INI_EXPORT` macro instead. * * - \subpage ini-syntax */ @@ -47,7 +48,8 @@ * - an option **must** always be defined in a section, * - empty options must be surrounded by quotes, * - lists can not includes trailing commas, - * - include statement must always be at the beginning of files (in no sections), + * - include statement must always be at the beginning of files + * (in no sections), * - comments starts with # until the end of line, * - options with spaces **must** use quotes. * @@ -62,7 +64,8 @@ * * # Redefinition * - * Sections can be redefined multiple times and are kept the order they are seen. + * Sections can be redefined multiple times and are kept the order they are + * seen. * * ````ini * [section] @@ -91,8 +94,8 @@ * * # Include statement * - * You can split a file into several pieces, if the include statement contains a relative path, the path will be relative - * to the current file being parsed. + * You can split a file into several pieces, if the include statement contains a + * relative path, the path will be relative to the current file being parsed. * * You **must** use the include statement before any section. * @@ -303,8 +306,8 @@ } /** - * Get the value. For words, quoted words and section, the value is the content. Otherwise it's the - * characters parsed. + * Get the value. For words, quoted words and section, the value is the + * content. Otherwise it's the characters parsed. * * \return the value */ @@ -511,7 +514,7 @@ */ inline bool contains(const std::string &key) const noexcept { - return std::find_if(begin(), end(), [&] (const auto &sc) { return sc.key() == key; }) != end(); + return find(key) != end(); } /** @@ -575,11 +578,11 @@ }; /** - * Analyse a stream and detect potential syntax errors. This does not parse the file like including other - * files in include statement. + * Analyse a stream and detect potential syntax errors. This does not parse the + * file like including other files in include statement. * - * It does only analysis, for example if an option is defined under no section, this does not trigger an - * error while it's invalid. + * It does only analysis, for example if an option is defined under no section, + * this does not trigger an error while it's invalid. * * \param it the iterator * \param end where to stop @@ -619,7 +622,8 @@ /** * Parse a string. * - * If the string contains include statements, they are relative to the current working directory. + * If the string contains include statements, they are relative to the current + * working directory. * * \param buffer the buffer * \return the document