Skip to content

Commit ff2d8b6

Browse files
authored
Revert "GH pocoproject#1050 JSON: fix gcc -Wshadow warnings"
1 parent 4120620 commit ff2d8b6

8 files changed

Lines changed: 39 additions & 39 deletions

File tree

‎Foundation/include/Poco/Nullable.h‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ class Nullable
7474
{
7575
}
7676

77-
Nullable(const C& rValue):
77+
Nullable(const C& value):
7878
/// Creates a Nullable with the given value.
79-
_value(rValue),
79+
_value(value),
8080
_isNull(false)
8181
{
8282
}
@@ -93,10 +93,10 @@ class Nullable
9393
{
9494
}
9595

96-
Nullable& assign(const C& rValue)
96+
Nullable& assign(const C& value)
9797
/// Assigns a value to the Nullable.
9898
{
99-
_value = rValue;
99+
_value = value;
100100
_isNull = false;
101101
return *this;
102102
}
@@ -116,10 +116,10 @@ class Nullable
116116
return *this;
117117
}
118118

119-
Nullable& operator = (const C& rValue)
119+
Nullable& operator = (const C& value)
120120
/// Assigns a value to the Nullable.
121121
{
122-
return assign(rValue);
122+
return assign(value);
123123
}
124124

125125
Nullable& operator = (const Nullable& other)
@@ -148,10 +148,10 @@ class Nullable
148148
return (_isNull && other._isNull) || (_isNull == other._isNull && _value == other._value);
149149
}
150150

151-
bool operator == (const C& rValue) const
151+
bool operator == (const C& value) const
152152
/// Compares Nullable with value for equality
153153
{
154-
return (!_isNull && _value == rValue);
154+
return (!_isNull && _value == value);
155155
}
156156

157157
bool operator == (const NullType&) const
@@ -160,10 +160,10 @@ class Nullable
160160
return _isNull;
161161
}
162162

163-
bool operator != (const C& rValue) const
163+
bool operator != (const C& value) const
164164
/// Compares Nullable with value for non equality
165165
{
166-
return !(*this == rValue);
166+
return !(*this == value);
167167
}
168168

169169
bool operator != (const Nullable<C>& other) const

‎JSON/include/Poco/JSON/Array.h‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -300,9 +300,9 @@ class VarHolderImpl<JSON::Array::Ptr>: public VarHolder
300300
throw BadCastException();
301301
}
302302

303-
void convert(bool& rValue) const
303+
void convert(bool& value) const
304304
{
305-
rValue = !_val.isNull() && _val->size() > 0;
305+
value = !_val.isNull() && _val->size() > 0;
306306
}
307307

308308
void convert(float&) const
@@ -439,9 +439,9 @@ class VarHolderImpl<JSON::Array>: public VarHolder
439439
throw BadCastException();
440440
}
441441

442-
void convert(bool& rValue) const
442+
void convert(bool& value) const
443443
{
444-
rValue = _val.size() > 0;
444+
value = _val.size() > 0;
445445
}
446446

447447
void convert(float&) const

‎JSON/include/Poco/JSON/Object.h‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,8 @@ class JSON_API Object
216216
if (indent > 0) out << std::endl;
217217

218218
typename C::const_iterator it = container.begin();
219-
typename C::const_iterator itEnd = container.end();
220-
for (; it != itEnd;)
219+
typename C::const_iterator end = container.end();
220+
for (; it != end;)
221221
{
222222
for(unsigned int i = 0; i < indent; i++) out << ' ';
223223

@@ -405,9 +405,9 @@ class VarHolderImpl<JSON::Object::Ptr>: public VarHolder
405405
throw BadCastException();
406406
}
407407

408-
void convert(bool& rValue) const
408+
void convert(bool& value) const
409409
{
410-
rValue = !_val.isNull() && _val->size() > 0;
410+
value = !_val.isNull() && _val->size() > 0;
411411
}
412412

413413
void convert(float&) const
@@ -547,9 +547,9 @@ class VarHolderImpl<JSON::Object>: public VarHolder
547547
throw BadCastException();
548548
}
549549

550-
void convert(bool& rValue) const
550+
void convert(bool& value) const
551551
{
552-
rValue = _val.size() > 0;
552+
value = _val.size() > 0;
553553
}
554554

555555
void convert(float&) const

‎JSON/include/Poco/JSON/PrintHandler.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,9 @@ class JSON_API PrintHandler : public Handler
119119
};
120120

121121

122-
inline void PrintHandler::setIndent(unsigned newIndent)
122+
inline void PrintHandler::setIndent(unsigned indent)
123123
{
124-
_indent = newIndent;
124+
_indent = indent;
125125
}
126126

127127

‎JSON/src/Array.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,10 @@ Array::operator const Poco::Dynamic::Array& () const
149149
if (!_pArray)
150150
{
151151
ValueVec::const_iterator it = _values.begin();
152-
ValueVec::const_iterator itEnd = _values.end();
152+
ValueVec::const_iterator end = _values.end();
153153
_pArray = new Poco::Dynamic::Array;
154154
int index = 0;
155-
for (; it != itEnd; ++it, ++index)
155+
for (; it != end; ++it, ++index)
156156
{
157157
if (isObject(it))
158158
{

‎JSON/src/Object.cpp‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ void Object::stringify(std::ostream& out, unsigned int indent, int step) const
113113
const std::string& Object::getKey(KeyPtrList::const_iterator& iter) const
114114
{
115115
ValueMap::const_iterator it = _values.begin();
116-
ValueMap::const_iterator itEnd = _values.end();
117-
for (; it != itEnd; ++it)
116+
ValueMap::const_iterator end = _values.end();
117+
for (; it != end; ++it)
118118
{
119119
if (it->first == **iter) return it->first;
120120
}
@@ -130,8 +130,8 @@ void Object::set(const std::string& key, const Dynamic::Var& value)
130130
if (_preserveInsOrder)
131131
{
132132
KeyPtrList::iterator it = _keys.begin();
133-
KeyPtrList::iterator itEnd = _keys.end();
134-
for (; it != itEnd; ++it)
133+
KeyPtrList::iterator end = _keys.end();
134+
for (; it != end; ++it)
135135
{
136136
if (key == **it) return;
137137
}
@@ -173,9 +173,9 @@ Object::operator const Poco::DynamicStruct& () const
173173
if (!_pStruct)
174174
{
175175
ValueMap::const_iterator it = _values.begin();
176-
ValueMap::const_iterator itEnd = _values.end();
176+
ValueMap::const_iterator end = _values.end();
177177
_pStruct = new Poco::DynamicStruct;
178-
for (; it != itEnd; ++it)
178+
for (; it != end; ++it)
179179
{
180180
if (isObject(it))
181181
{

‎JSON/src/ParseHandler.cpp‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,20 +122,20 @@ void ParseHandler::key(const std::string& k)
122122
}
123123

124124

125-
void ParseHandler::setValue(const Var& rValue)
125+
void ParseHandler::setValue(const Var& value)
126126
{
127127
Var parent = _stack.top();
128128

129129
if ( parent.type() == typeid(Array::Ptr) )
130130
{
131131
Array::Ptr arr = parent.extract<Array::Ptr>();
132-
arr->add(rValue);
132+
arr->add(value);
133133
}
134134
else if ( parent.type() == typeid(Object::Ptr) )
135135
{
136136
poco_assert_dbg(!_key.empty());
137137
Object::Ptr obj = parent.extract<Object::Ptr>();
138-
obj->set(_key, rValue);
138+
obj->set(_key, value);
139139
_key.clear();
140140
}
141141
}

‎JSON/src/PrintHandler.cpp‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,18 @@ namespace Poco {
2323
namespace JSON {
2424

2525

26-
PrintHandler::PrintHandler(unsigned newIndent):
26+
PrintHandler::PrintHandler(unsigned indent):
2727
_out(std::cout),
28-
_indent(newIndent),
28+
_indent(indent),
2929
_array(0),
3030
_objStart(true)
3131
{
3232
}
3333

3434

35-
PrintHandler::PrintHandler(std::ostream& out, unsigned newIndent):
35+
PrintHandler::PrintHandler(std::ostream& out, unsigned indent):
3636
_out(out),
37-
_indent(newIndent),
37+
_indent(indent),
3838
_array(0),
3939
_objStart(true)
4040
{
@@ -172,10 +172,10 @@ void PrintHandler::value(UInt64 v)
172172
#endif
173173

174174

175-
void PrintHandler::value(const std::string& rValue)
175+
void PrintHandler::value(const std::string& value)
176176
{
177177
arrayValue();
178-
Stringifier::formatString(rValue, _out);
178+
Stringifier::formatString(value, _out);
179179
_objStart = false;
180180
}
181181

0 commit comments

Comments
 (0)