Revert "GH #1050 JSON: fix gcc -Wshadow warnings"

This commit is contained in:
Günter Obiltschnig 2016-09-05 08:37:47 +02:00 committed by GitHub
parent 4120620ced
commit ff2d8b65c7
8 changed files with 39 additions and 39 deletions

View File

@ -74,9 +74,9 @@ public:
{
}
Nullable(const C& rValue):
Nullable(const C& value):
/// Creates a Nullable with the given value.
_value(rValue),
_value(value),
_isNull(false)
{
}
@ -93,10 +93,10 @@ public:
{
}
Nullable& assign(const C& rValue)
Nullable& assign(const C& value)
/// Assigns a value to the Nullable.
{
_value = rValue;
_value = value;
_isNull = false;
return *this;
}
@ -116,10 +116,10 @@ public:
return *this;
}
Nullable& operator = (const C& rValue)
Nullable& operator = (const C& value)
/// Assigns a value to the Nullable.
{
return assign(rValue);
return assign(value);
}
Nullable& operator = (const Nullable& other)
@ -148,10 +148,10 @@ public:
return (_isNull && other._isNull) || (_isNull == other._isNull && _value == other._value);
}
bool operator == (const C& rValue) const
bool operator == (const C& value) const
/// Compares Nullable with value for equality
{
return (!_isNull && _value == rValue);
return (!_isNull && _value == value);
}
bool operator == (const NullType&) const
@ -160,10 +160,10 @@ public:
return _isNull;
}
bool operator != (const C& rValue) const
bool operator != (const C& value) const
/// Compares Nullable with value for non equality
{
return !(*this == rValue);
return !(*this == value);
}
bool operator != (const Nullable<C>& other) const

View File

@ -300,9 +300,9 @@ public:
throw BadCastException();
}
void convert(bool& rValue) const
void convert(bool& value) const
{
rValue = !_val.isNull() && _val->size() > 0;
value = !_val.isNull() && _val->size() > 0;
}
void convert(float&) const
@ -439,9 +439,9 @@ public:
throw BadCastException();
}
void convert(bool& rValue) const
void convert(bool& value) const
{
rValue = _val.size() > 0;
value = _val.size() > 0;
}
void convert(float&) const

View File

@ -216,8 +216,8 @@ private:
if (indent > 0) out << std::endl;
typename C::const_iterator it = container.begin();
typename C::const_iterator itEnd = container.end();
for (; it != itEnd;)
typename C::const_iterator end = container.end();
for (; it != end;)
{
for(unsigned int i = 0; i < indent; i++) out << ' ';
@ -405,9 +405,9 @@ public:
throw BadCastException();
}
void convert(bool& rValue) const
void convert(bool& value) const
{
rValue = !_val.isNull() && _val->size() > 0;
value = !_val.isNull() && _val->size() > 0;
}
void convert(float&) const
@ -547,9 +547,9 @@ public:
throw BadCastException();
}
void convert(bool& rValue) const
void convert(bool& value) const
{
rValue = _val.size() > 0;
value = _val.size() > 0;
}
void convert(float&) const

View File

@ -119,9 +119,9 @@ private:
};
inline void PrintHandler::setIndent(unsigned newIndent)
inline void PrintHandler::setIndent(unsigned indent)
{
_indent = newIndent;
_indent = indent;
}

View File

@ -149,10 +149,10 @@ Array::operator const Poco::Dynamic::Array& () const
if (!_pArray)
{
ValueVec::const_iterator it = _values.begin();
ValueVec::const_iterator itEnd = _values.end();
ValueVec::const_iterator end = _values.end();
_pArray = new Poco::Dynamic::Array;
int index = 0;
for (; it != itEnd; ++it, ++index)
for (; it != end; ++it, ++index)
{
if (isObject(it))
{

View File

@ -113,8 +113,8 @@ void Object::stringify(std::ostream& out, unsigned int indent, int step) const
const std::string& Object::getKey(KeyPtrList::const_iterator& iter) const
{
ValueMap::const_iterator it = _values.begin();
ValueMap::const_iterator itEnd = _values.end();
for (; it != itEnd; ++it)
ValueMap::const_iterator end = _values.end();
for (; it != end; ++it)
{
if (it->first == **iter) return it->first;
}
@ -130,8 +130,8 @@ void Object::set(const std::string& key, const Dynamic::Var& value)
if (_preserveInsOrder)
{
KeyPtrList::iterator it = _keys.begin();
KeyPtrList::iterator itEnd = _keys.end();
for (; it != itEnd; ++it)
KeyPtrList::iterator end = _keys.end();
for (; it != end; ++it)
{
if (key == **it) return;
}
@ -173,9 +173,9 @@ Object::operator const Poco::DynamicStruct& () const
if (!_pStruct)
{
ValueMap::const_iterator it = _values.begin();
ValueMap::const_iterator itEnd = _values.end();
ValueMap::const_iterator end = _values.end();
_pStruct = new Poco::DynamicStruct;
for (; it != itEnd; ++it)
for (; it != end; ++it)
{
if (isObject(it))
{

View File

@ -122,20 +122,20 @@ void ParseHandler::key(const std::string& k)
}
void ParseHandler::setValue(const Var& rValue)
void ParseHandler::setValue(const Var& value)
{
Var parent = _stack.top();
if ( parent.type() == typeid(Array::Ptr) )
{
Array::Ptr arr = parent.extract<Array::Ptr>();
arr->add(rValue);
arr->add(value);
}
else if ( parent.type() == typeid(Object::Ptr) )
{
poco_assert_dbg(!_key.empty());
Object::Ptr obj = parent.extract<Object::Ptr>();
obj->set(_key, rValue);
obj->set(_key, value);
_key.clear();
}
}

View File

@ -23,18 +23,18 @@ namespace Poco {
namespace JSON {
PrintHandler::PrintHandler(unsigned newIndent):
PrintHandler::PrintHandler(unsigned indent):
_out(std::cout),
_indent(newIndent),
_indent(indent),
_array(0),
_objStart(true)
{
}
PrintHandler::PrintHandler(std::ostream& out, unsigned newIndent):
PrintHandler::PrintHandler(std::ostream& out, unsigned indent):
_out(out),
_indent(newIndent),
_indent(indent),
_array(0),
_objStart(true)
{
@ -172,10 +172,10 @@ void PrintHandler::value(UInt64 v)
#endif
void PrintHandler::value(const std::string& rValue)
void PrintHandler::value(const std::string& value)
{
arrayValue();
Stringifier::formatString(rValue, _out);
Stringifier::formatString(value, _out);
_objStart = false;
}