mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-03-02 20:30:10 +01:00
Fix clang format issues (#1555)
This commit is contained in:
parent
6668fa51ee
commit
5c003ecacc
@ -69,7 +69,9 @@ public:
|
||||
// Boilerplate
|
||||
SecureAllocator() {}
|
||||
template <typename U> SecureAllocator(const SecureAllocator<U>&) {}
|
||||
template <typename U> struct rebind { using other = SecureAllocator<U>; };
|
||||
template <typename U> struct rebind {
|
||||
using other = SecureAllocator<U>;
|
||||
};
|
||||
};
|
||||
|
||||
template <typename T, typename U>
|
||||
|
@ -586,19 +586,23 @@ public:
|
||||
iterator end();
|
||||
|
||||
/// \brief Returns a reference to the first element in the `Value`.
|
||||
/// Requires that this value holds an array or json object, with at least one element.
|
||||
/// Requires that this value holds an array or json object, with at least one
|
||||
/// element.
|
||||
const Value& front() const;
|
||||
|
||||
/// \brief Returns a reference to the first element in the `Value`.
|
||||
/// Requires that this value holds an array or json object, with at least one element.
|
||||
/// Requires that this value holds an array or json object, with at least one
|
||||
/// element.
|
||||
Value& front();
|
||||
|
||||
/// \brief Returns a reference to the last element in the `Value`.
|
||||
/// Requires that value holds an array or json object, with at least one element.
|
||||
/// Requires that value holds an array or json object, with at least one
|
||||
/// element.
|
||||
const Value& back() const;
|
||||
|
||||
/// \brief Returns a reference to the last element in the `Value`.
|
||||
/// Requires that this value holds an array or json object, with at least one element.
|
||||
/// Requires that this value holds an array or json object, with at least one
|
||||
/// element.
|
||||
Value& back();
|
||||
|
||||
// Accessors for the [start, limit) range of bytes within the JSON text from
|
||||
|
@ -168,8 +168,7 @@ public:
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4996) // Deriving from deprecated class
|
||||
#endif
|
||||
class JSON_API FastWriter
|
||||
: public Writer {
|
||||
class JSON_API FastWriter : public Writer {
|
||||
public:
|
||||
FastWriter();
|
||||
~FastWriter() override = default;
|
||||
@ -228,8 +227,7 @@ private:
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4996) // Deriving from deprecated class
|
||||
#endif
|
||||
class JSON_API
|
||||
StyledWriter : public Writer {
|
||||
class JSON_API StyledWriter : public Writer {
|
||||
public:
|
||||
StyledWriter();
|
||||
~StyledWriter() override = default;
|
||||
@ -297,8 +295,7 @@ private:
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4996) // Deriving from deprecated class
|
||||
#endif
|
||||
class JSON_API
|
||||
StyledStreamWriter {
|
||||
class JSON_API StyledStreamWriter {
|
||||
public:
|
||||
/**
|
||||
* \param indentation Each level will be indented by this amount extra.
|
||||
|
@ -132,8 +132,9 @@ String valueToString(double value, bool useSpecialFloats,
|
||||
if (!isfinite(value)) {
|
||||
static const char* const reps[2][3] = {{"NaN", "-Infinity", "Infinity"},
|
||||
{"null", "-1e+9999", "1e+9999"}};
|
||||
return reps[useSpecialFloats ? 0 : 1]
|
||||
[isnan(value) ? 0 : (value < 0) ? 1 : 2];
|
||||
return reps[useSpecialFloats ? 0 : 1][isnan(value) ? 0
|
||||
: (value < 0) ? 1
|
||||
: 2];
|
||||
}
|
||||
|
||||
String buffer(size_t(36), '\0');
|
||||
|
Loading…
x
Reference in New Issue
Block a user