GH #1050 Foundation: fix gcc -Wshadow warnings

This commit is contained in:
Miklos Vajna
2015-11-30 15:49:07 +01:00
parent c38ed216d2
commit b9cfd346a1
46 changed files with 360 additions and 360 deletions

View File

@@ -77,33 +77,33 @@ public:
/// Readable event observers are notified, with true value
/// as the argument
BasicFIFOBuffer(std::size_t size, bool notify = false):
_buffer(size),
BasicFIFOBuffer(std::size_t bufferSize, bool bufferNotify = false):
_buffer(bufferSize),
_begin(0),
_used(0),
_notify(notify),
_notify(bufferNotify),
_eof(false),
_error(false)
/// Creates the FIFOBuffer.
{
}
BasicFIFOBuffer(T* pBuffer, std::size_t size, bool notify = false):
_buffer(pBuffer, size),
BasicFIFOBuffer(T* pBuffer, std::size_t bufferSize, bool bufferNotify = false):
_buffer(pBuffer, bufferSize),
_begin(0),
_used(0),
_notify(notify),
_notify(bufferNotify),
_eof(false),
_error(false)
/// Creates the FIFOBuffer.
{
}
BasicFIFOBuffer(const T* pBuffer, std::size_t size, bool notify = false):
_buffer(pBuffer, size),
BasicFIFOBuffer(const T* pBuffer, std::size_t bufferSize, bool bufferNotify = false):
_buffer(pBuffer, bufferSize),
_begin(0),
_used(size),
_notify(notify),
_used(bufferSize),
_notify(bufferNotify),
_eof(false),
_error(false)
/// Creates the FIFOBuffer.
@@ -154,7 +154,7 @@ public:
return length;
}
std::size_t peek(Poco::Buffer<T>& buffer, std::size_t length = 0) const
std::size_t peek(Poco::Buffer<T>& rBuffer, std::size_t length = 0) const
/// Peeks into the data currently in the FIFO
/// without actually extracting it.
/// Resizes the supplied buffer to the size of
@@ -169,8 +169,8 @@ public:
Mutex::ScopedLock lock(_mutex);
if (!isReadable()) return 0;
if (0 == length || length > _used) length = _used;
buffer.resize(length);
return peek(buffer.begin(), length);
rBuffer.resize(length);
return peek(rBuffer.begin(), length);
}
std::size_t read(T* pBuffer, std::size_t length)
@@ -196,7 +196,7 @@ public:
return readLen;
}
std::size_t read(Poco::Buffer<T>& buffer, std::size_t length = 0)
std::size_t read(Poco::Buffer<T>& rBuffer, std::size_t length = 0)
/// Copies the data currently in the FIFO
/// into the supplied buffer.
/// Resizes the supplied buffer to the size of
@@ -207,7 +207,7 @@ public:
Mutex::ScopedLock lock(_mutex);
if (!isReadable()) return 0;
std::size_t usedBefore = _used;
std::size_t readLen = peek(buffer, length);
std::size_t readLen = peek(rBuffer, length);
poco_assert (_used >= readLen);
_used -= readLen;
if (0 == _used) _begin = 0;
@@ -242,8 +242,8 @@ public:
}
std::size_t usedBefore = _used;
std::size_t available = _buffer.size() - _used - _begin;
std::size_t len = length > available ? available : length;
std::size_t availableBefore = _buffer.size() - _used - _begin;
std::size_t len = length > availableBefore ? availableBefore : length;
std::memcpy(begin() + _used, pBuffer, len * sizeof(T));
_used += len;
poco_assert (_used <= _buffer.size());
@@ -252,7 +252,7 @@ public:
return len;
}
std::size_t write(const Buffer<T>& buffer, std::size_t length = 0)
std::size_t write(const Buffer<T>& rBuffer, std::size_t length = 0)
/// Writes data from supplied buffer to the FIFO buffer.
/// If there is no sufficient space for the whole
/// buffer to be written, data up to available
@@ -263,10 +263,10 @@ public:
///
/// Returns the length of data written.
{
if (length == 0 || length > buffer.size())
length = buffer.size();
if (length == 0 || length > rBuffer.size())
length = rBuffer.size();
return write(buffer.begin(), length);
return write(rBuffer.begin(), length);
}
std::size_t size() const
@@ -499,10 +499,10 @@ public:
return !isFull() && isValid() && !_eof;
}
void setNotify(bool notify = true)
void setNotify(bool bufferNotify = true)
/// Enables/disables notifications.
{
_notify = notify;
_notify = bufferNotify;
}
bool getNotify() const