mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-10-18 19:48:44 +02:00
Spelling (#703)
This commit is contained in:

committed by
Christopher Dunn

parent
7c979e8661
commit
e6a588a246
@@ -71,7 +71,7 @@ enum {
|
||||
typedef char UIntToStringBuffer[uintToStringBufferSize];
|
||||
|
||||
/** Converts an unsigned integer to string.
|
||||
* @param value Unsigned interger to convert to string
|
||||
* @param value Unsigned integer to convert to string
|
||||
* @param current Input/Output string buffer.
|
||||
* Must have at least uintToStringBufferSize chars free.
|
||||
*/
|
||||
|
@@ -128,7 +128,7 @@ JSONCPP_STRING valueToString(double value, bool useSpecialFloats, unsigned int p
|
||||
snprintf(formatString, sizeof(formatString), "%%.%dg", precision);
|
||||
|
||||
// Print into the buffer. We need not request the alternative representation
|
||||
// that always has a decimal point because JSON doesn't distingish the
|
||||
// that always has a decimal point because JSON doesn't distinguish the
|
||||
// concepts of reals and integers.
|
||||
if (isfinite(value)) {
|
||||
len = snprintf(buffer, sizeof(buffer), formatString, value);
|
||||
@@ -334,10 +334,10 @@ Writer::~Writer() {}
|
||||
// //////////////////////////////////////////////////////////////////
|
||||
|
||||
FastWriter::FastWriter()
|
||||
: yamlCompatiblityEnabled_(false), dropNullPlaceholders_(false),
|
||||
: yamlCompatibilityEnabled_(false), dropNullPlaceholders_(false),
|
||||
omitEndingLineFeed_(false) {}
|
||||
|
||||
void FastWriter::enableYAMLCompatibility() { yamlCompatiblityEnabled_ = true; }
|
||||
void FastWriter::enableYAMLCompatibility() { yamlCompatibilityEnabled_ = true; }
|
||||
|
||||
void FastWriter::dropNullPlaceholders() { dropNullPlaceholders_ = true; }
|
||||
|
||||
@@ -397,7 +397,7 @@ void FastWriter::writeValue(const Value& value) {
|
||||
if (it != members.begin())
|
||||
document_ += ',';
|
||||
document_ += valueToQuotedStringN(name.data(), static_cast<unsigned>(name.length()));
|
||||
document_ += yamlCompatiblityEnabled_ ? ": " : ":";
|
||||
document_ += yamlCompatibilityEnabled_ ? ": " : ":";
|
||||
writeValue(value[name]);
|
||||
}
|
||||
document_ += '}';
|
||||
@@ -486,7 +486,7 @@ void StyledWriter::writeArrayValue(const Value& value) {
|
||||
if (size == 0)
|
||||
pushValue("[]");
|
||||
else {
|
||||
bool isArrayMultiLine = isMultineArray(value);
|
||||
bool isArrayMultiLine = isMultilineArray(value);
|
||||
if (isArrayMultiLine) {
|
||||
writeWithIndent("[");
|
||||
indent();
|
||||
@@ -524,7 +524,7 @@ void StyledWriter::writeArrayValue(const Value& value) {
|
||||
}
|
||||
}
|
||||
|
||||
bool StyledWriter::isMultineArray(const Value& value) {
|
||||
bool StyledWriter::isMultilineArray(const Value& value) {
|
||||
ArrayIndex const size = value.size();
|
||||
bool isMultiLine = size * 3 >= rightMargin_;
|
||||
childValues_.clear();
|
||||
@@ -703,7 +703,7 @@ void StyledStreamWriter::writeArrayValue(const Value& value) {
|
||||
if (size == 0)
|
||||
pushValue("[]");
|
||||
else {
|
||||
bool isArrayMultiLine = isMultineArray(value);
|
||||
bool isArrayMultiLine = isMultilineArray(value);
|
||||
if (isArrayMultiLine) {
|
||||
writeWithIndent("[");
|
||||
indent();
|
||||
@@ -743,7 +743,7 @@ void StyledStreamWriter::writeArrayValue(const Value& value) {
|
||||
}
|
||||
}
|
||||
|
||||
bool StyledStreamWriter::isMultineArray(const Value& value) {
|
||||
bool StyledStreamWriter::isMultilineArray(const Value& value) {
|
||||
ArrayIndex const size = value.size();
|
||||
bool isMultiLine = size * 3 >= rightMargin_;
|
||||
childValues_.clear();
|
||||
@@ -860,7 +860,7 @@ struct BuiltStyledStreamWriter : public StreamWriter
|
||||
private:
|
||||
void writeValue(Value const& value);
|
||||
void writeArrayValue(Value const& value);
|
||||
bool isMultineArray(Value const& value);
|
||||
bool isMultilineArray(Value const& value);
|
||||
void pushValue(JSONCPP_STRING const& value);
|
||||
void writeIndent();
|
||||
void writeWithIndent(JSONCPP_STRING const& value);
|
||||
@@ -984,7 +984,7 @@ void BuiltStyledStreamWriter::writeArrayValue(Value const& value) {
|
||||
if (size == 0)
|
||||
pushValue("[]");
|
||||
else {
|
||||
bool isMultiLine = (cs_ == CommentStyle::All) || isMultineArray(value);
|
||||
bool isMultiLine = (cs_ == CommentStyle::All) || isMultilineArray(value);
|
||||
if (isMultiLine) {
|
||||
writeWithIndent("[");
|
||||
indent();
|
||||
@@ -1026,7 +1026,7 @@ void BuiltStyledStreamWriter::writeArrayValue(Value const& value) {
|
||||
}
|
||||
}
|
||||
|
||||
bool BuiltStyledStreamWriter::isMultineArray(Value const& value) {
|
||||
bool BuiltStyledStreamWriter::isMultilineArray(Value const& value) {
|
||||
ArrayIndex const size = value.size();
|
||||
bool isMultiLine = size * 3 >= rightMargin_;
|
||||
childValues_.clear();
|
||||
|
@@ -398,7 +398,7 @@ void Runner::preventDialogOnCrash() {
|
||||
_CrtSetReportHook(&msvcrtSilentReportHook);
|
||||
#endif // if defined(_MSC_VER)
|
||||
|
||||
// @todo investiguate this handler (for buffer overflow)
|
||||
// @todo investigate this handler (for buffer overflow)
|
||||
// _set_security_error_handler
|
||||
|
||||
#if defined(_WIN32)
|
||||
|
@@ -2040,7 +2040,7 @@ JSONTEST_FIXTURE(CharReaderFailIfExtraTest, issue164) {
|
||||
}
|
||||
}
|
||||
JSONTEST_FIXTURE(CharReaderFailIfExtraTest, issue107) {
|
||||
// This is interpretted as an int value followed by a colon.
|
||||
// This is interpreted as an int value followed by a colon.
|
||||
Json::CharReaderBuilder b;
|
||||
Json::Value root;
|
||||
char const doc[] =
|
||||
|
Reference in New Issue
Block a user