aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/external
diff options
context:
space:
mode:
authororivej <orivej@yandex-team.ru>2022-02-10 16:44:49 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:44:49 +0300
commit718c552901d703c502ccbefdfc3c9028d608b947 (patch)
tree46534a98bbefcd7b1f3faa5b52c138ab27db75b7 /contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/external
parente9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (diff)
downloadydb-718c552901d703c502ccbefdfc3c9028d608b947.tar.gz
Restoring authorship annotation for <orivej@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/external')
-rw-r--r--contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/external/cjson/cJSON.cpp108
-rw-r--r--contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/external/tinyxml2/tinyxml2.cpp34
2 files changed, 71 insertions, 71 deletions
diff --git a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/external/cjson/cJSON.cpp b/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/external/cjson/cJSON.cpp
index 2525976334..4d090ca9a8 100644
--- a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/external/cjson/cJSON.cpp
+++ b/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/external/cjson/cJSON.cpp
@@ -269,7 +269,7 @@ static cJSON_bool parse_number(cJSON * const item, parse_buffer * const input_bu
unsigned char *after_end = NULL;
unsigned char number_c_string[64];
unsigned char decimal_point = get_decimal_point();
- bool isInteger = true;
+ bool isInteger = true;
size_t i = 0;
if ((input_buffer == NULL) || (input_buffer->content == NULL))
@@ -296,17 +296,17 @@ static cJSON_bool parse_number(cJSON * const item, parse_buffer * const input_bu
case '9':
case '+':
case '-':
- number_c_string[i] = buffer_at_offset(input_buffer)[i];
- break;
+ number_c_string[i] = buffer_at_offset(input_buffer)[i];
+ break;
case 'e':
case 'E':
number_c_string[i] = buffer_at_offset(input_buffer)[i];
- isInteger = false;
+ isInteger = false;
break;
case '.':
number_c_string[i] = decimal_point;
- isInteger = false;
+ isInteger = false;
break;
default:
@@ -323,12 +323,12 @@ loop_end:
}
item->valuedouble = number;
- // For integer which is out of the range of [INT_MIN, INT_MAX], it may lose precision if we cast it to double.
- // Instead, we keep the integer literal as a string.
- if (isInteger && (number > INT_MAX || number < INT_MIN))
- {
- item->valuestring = (char*)cJSON_strdup(number_c_string, &global_hooks);
- }
+ // For integer which is out of the range of [INT_MIN, INT_MAX], it may lose precision if we cast it to double.
+ // Instead, we keep the integer literal as a string.
+ if (isInteger && (number > INT_MAX || number < INT_MIN))
+ {
+ item->valuestring = (char*)cJSON_strdup(number_c_string, &global_hooks);
+ }
/* use saturation in case of overflow */
if (number >= INT_MAX)
@@ -497,13 +497,13 @@ static cJSON_bool print_number(const cJSON * const item, printbuffer * const out
return false;
}
- /* For integer which is out of the range of [INT_MIN, INT_MAX], valuestring is an integer literal. */
- if (item->valuestring)
- {
- length = sprintf((char*)number_buffer, "%s", item->valuestring);
- }
+ /* For integer which is out of the range of [INT_MIN, INT_MAX], valuestring is an integer literal. */
+ if (item->valuestring)
+ {
+ length = sprintf((char*)number_buffer, "%s", item->valuestring);
+ }
/* This checks for NaN and Infinity */
- else if ((d * 0) != 0)
+ else if ((d * 0) != 0)
{
length = sprintf((char*)number_buffer, "null");
}
@@ -520,7 +520,7 @@ static cJSON_bool print_number(const cJSON * const item, printbuffer * const out
}
}
- /* sprintf failed or buffer overrun occurred */
+ /* sprintf failed or buffer overrun occurred */
if ((length < 0) || (length > (int)(sizeof(number_buffer) - 1)))
{
return false;
@@ -1571,7 +1571,7 @@ static cJSON_bool parse_object(cJSON * const item, parse_buffer * const input_bu
buffer_skip_whitespace(input_buffer);
if (!parse_string(current_item, input_buffer))
{
- goto fail; /* failed to parse name */
+ goto fail; /* failed to parse name */
}
buffer_skip_whitespace(input_buffer);
@@ -2329,41 +2329,41 @@ CJSON_PUBLIC(cJSON *) cJSON_CreateNumber(double num)
return item;
}
-CJSON_PUBLIC(cJSON *) cJSON_CreateInt64(long long num)
-{
- cJSON *item = cJSON_New_Item(&global_hooks);
- if(item)
- {
- item->type = cJSON_Number;
- item->valuedouble = static_cast<double>(num);
-
- // For integer which is out of the range of [INT_MIN, INT_MAX], it may lose precision if we cast it to double.
- // Instead, we keep the integer literal as a string.
- if (num > INT_MAX || num < INT_MIN)
- {
- char buf[21];
- sprintf(buf, "%lld", num);
- item->valuestring = (char*)cJSON_strdup((const unsigned char*)buf, &global_hooks);
- }
-
- /* use saturation in case of overflow */
- if (num >= INT_MAX)
- {
- item->valueint = INT_MAX;
- }
- else if (num <= INT_MIN)
- {
- item->valueint = INT_MIN;
- }
- else
- {
- item->valueint = (int)num;
- }
- }
-
- return item;
-}
-
+CJSON_PUBLIC(cJSON *) cJSON_CreateInt64(long long num)
+{
+ cJSON *item = cJSON_New_Item(&global_hooks);
+ if(item)
+ {
+ item->type = cJSON_Number;
+ item->valuedouble = static_cast<double>(num);
+
+ // For integer which is out of the range of [INT_MIN, INT_MAX], it may lose precision if we cast it to double.
+ // Instead, we keep the integer literal as a string.
+ if (num > INT_MAX || num < INT_MIN)
+ {
+ char buf[21];
+ sprintf(buf, "%lld", num);
+ item->valuestring = (char*)cJSON_strdup((const unsigned char*)buf, &global_hooks);
+ }
+
+ /* use saturation in case of overflow */
+ if (num >= INT_MAX)
+ {
+ item->valueint = INT_MAX;
+ }
+ else if (num <= INT_MIN)
+ {
+ item->valueint = INT_MIN;
+ }
+ else
+ {
+ item->valueint = (int)num;
+ }
+ }
+
+ return item;
+}
+
CJSON_PUBLIC(cJSON *) cJSON_CreateString(const char *string)
{
cJSON *item = cJSON_New_Item(&global_hooks);
diff --git a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/external/tinyxml2/tinyxml2.cpp b/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/external/tinyxml2/tinyxml2.cpp
index ebe0fd9eec..0323c55d04 100644
--- a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/external/tinyxml2/tinyxml2.cpp
+++ b/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/external/tinyxml2/tinyxml2.cpp
@@ -770,7 +770,7 @@ XMLNode::~XMLNode()
}
}
-const char* XMLNode::Value() const
+const char* XMLNode::Value() const
{
// Edge case: XMLDocuments don't have a Value. Return null.
if ( this->ToDocument() )
@@ -1339,12 +1339,12 @@ bool XMLUnknown::Accept( XMLVisitor* visitor ) const
// --------- XMLAttribute ---------- //
-const char* XMLAttribute::Name() const
+const char* XMLAttribute::Name() const
{
return _name.GetStr();
}
-const char* XMLAttribute::Value() const
+const char* XMLAttribute::Value() const
{
return _value.GetStr();
}
@@ -1531,42 +1531,42 @@ const char* XMLElement::Attribute( const char* name, const char* value ) const
return 0;
}
-int XMLElement::IntAttribute(const char* name, int defaultValue) const
+int XMLElement::IntAttribute(const char* name, int defaultValue) const
{
int i = defaultValue;
QueryIntAttribute(name, &i);
return i;
}
-unsigned XMLElement::UnsignedAttribute(const char* name, unsigned defaultValue) const
+unsigned XMLElement::UnsignedAttribute(const char* name, unsigned defaultValue) const
{
unsigned i = defaultValue;
QueryUnsignedAttribute(name, &i);
return i;
}
-int64_t XMLElement::Int64Attribute(const char* name, int64_t defaultValue) const
+int64_t XMLElement::Int64Attribute(const char* name, int64_t defaultValue) const
{
int64_t i = defaultValue;
QueryInt64Attribute(name, &i);
return i;
}
-bool XMLElement::BoolAttribute(const char* name, bool defaultValue) const
+bool XMLElement::BoolAttribute(const char* name, bool defaultValue) const
{
bool b = defaultValue;
QueryBoolAttribute(name, &b);
return b;
}
-double XMLElement::DoubleAttribute(const char* name, double defaultValue) const
+double XMLElement::DoubleAttribute(const char* name, double defaultValue) const
{
double d = defaultValue;
QueryDoubleAttribute(name, &d);
return d;
}
-float XMLElement::FloatAttribute(const char* name, float defaultValue) const
+float XMLElement::FloatAttribute(const char* name, float defaultValue) const
{
float f = defaultValue;
QueryFloatAttribute(name, &f);
@@ -1593,7 +1593,7 @@ void XMLElement::SetText( const char* inText )
}
-void XMLElement::SetText( int v )
+void XMLElement::SetText( int v )
{
char buf[BUF_SIZE];
XMLUtil::ToStr( v, buf, BUF_SIZE );
@@ -1601,7 +1601,7 @@ void XMLElement::SetText( int v )
}
-void XMLElement::SetText( unsigned v )
+void XMLElement::SetText( unsigned v )
{
char buf[BUF_SIZE];
XMLUtil::ToStr( v, buf, BUF_SIZE );
@@ -1625,7 +1625,7 @@ void XMLElement::SetText( bool v )
}
-void XMLElement::SetText( float v )
+void XMLElement::SetText( float v )
{
char buf[BUF_SIZE];
XMLUtil::ToStr( v, buf, BUF_SIZE );
@@ -1633,7 +1633,7 @@ void XMLElement::SetText( float v )
}
-void XMLElement::SetText( double v )
+void XMLElement::SetText( double v )
{
char buf[BUF_SIZE];
XMLUtil::ToStr( v, buf, BUF_SIZE );
@@ -2061,7 +2061,7 @@ void XMLDocument::Clear()
_commentPool.Trace( "comment" );
_attributePool.Trace( "attribute" );
#endif
-
+
#ifdef DEBUG
if ( !hadError ) {
TIXMLASSERT( _elementPool.CurrentAllocs() == _elementPool.Untracked() );
@@ -2140,7 +2140,7 @@ static FILE* callfopen( const char* filepath, const char* mode )
#endif
return fp;
}
-
+
void XMLDocument::DeleteNode( XMLNode* node ) {
TIXMLASSERT( node );
TIXMLASSERT(node->_document == this );
@@ -2340,7 +2340,7 @@ void XMLDocument::SetError( XMLError error, int lineNum, const char* format, ...
return errorName;
}
-const char* XMLDocument::ErrorStr() const
+const char* XMLDocument::ErrorStr() const
{
return _errorStr.Empty() ? "" : _errorStr.GetStr();
}
@@ -2798,5 +2798,5 @@ bool XMLPrinter::Visit( const XMLUnknown& unknown )
}
} // namespace tinyxml2
-} // namespace External
+} // namespace External
} // namespace Aws \ No newline at end of file