Enforce LF text checkouts across platforms

This commit is contained in:
ragnarok-clanker 2026-10-25 21:09:55 +01:00
commit ae8da74188
3 changed files with 44 additions and 43 deletions

1
.gitattributes vendored Normal file
View file

@ -0,0 +1 @@
* text=auto eol=lf

View file

@ -1 +1 @@
The json-cpp library and this documentation are in Public Domain. The json-cpp library and this documentation are in Public Domain.

View file

@ -1,42 +1,42 @@
#ifndef CPPTL_JSON_FEATURES_H_INCLUDED #ifndef CPPTL_JSON_FEATURES_H_INCLUDED
# define CPPTL_JSON_FEATURES_H_INCLUDED # define CPPTL_JSON_FEATURES_H_INCLUDED
# include "forwards.h" # include "forwards.h"
namespace Json { namespace Json {
/** \brief Configuration passed to reader and writer. /** \brief Configuration passed to reader and writer.
* This configuration object can be used to force the Reader or Writer * This configuration object can be used to force the Reader or Writer
* to behave in a standard conforming way. * to behave in a standard conforming way.
*/ */
class JSON_API Features class JSON_API Features
{ {
public: public:
/** \brief A configuration that allows all features and assumes all strings are UTF-8. /** \brief A configuration that allows all features and assumes all strings are UTF-8.
* - C & C++ comments are allowed * - C & C++ comments are allowed
* - Root object can be any JSON value * - Root object can be any JSON value
* - Assumes Value strings are encoded in UTF-8 * - Assumes Value strings are encoded in UTF-8
*/ */
static Features all(); static Features all();
/** \brief A configuration that is strictly compatible with the JSON specification. /** \brief A configuration that is strictly compatible with the JSON specification.
* - Comments are forbidden. * - Comments are forbidden.
* - Root object must be either an array or an object value. * - Root object must be either an array or an object value.
* - Assumes Value strings are encoded in UTF-8 * - Assumes Value strings are encoded in UTF-8
*/ */
static Features strictMode(); static Features strictMode();
/** \brief Initialize the configuration like JsonConfig::allFeatures; /** \brief Initialize the configuration like JsonConfig::allFeatures;
*/ */
Features(); Features();
/// \c true if comments are allowed. Default: \c true. /// \c true if comments are allowed. Default: \c true.
bool allowComments_; bool allowComments_;
/// \c true if root must be either an array or an object value. Default: \c false. /// \c true if root must be either an array or an object value. Default: \c false.
bool strictRoot_; bool strictRoot_;
}; };
} // namespace Json } // namespace Json
#endif // CPPTL_JSON_FEATURES_H_INCLUDED #endif // CPPTL_JSON_FEATURES_H_INCLUDED