diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2015-03-21 17:52:18 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2015-03-21 17:52:18 +0100 |
commit | 3ca763faf015958b8aed212efabbfac128adccee (patch) | |
tree | 3f73d6430c819afda92072cac8f4d24a24a2fde2 | |
parent | 14366746b65b92203ff1f5328c4ac35e165237f7 (diff) | |
download | fdk-aac-dabplus-3ca763faf015958b8aed212efabbfac128adccee.tar.gz fdk-aac-dabplus-3ca763faf015958b8aed212efabbfac128adccee.tar.bz2 fdk-aac-dabplus-3ca763faf015958b8aed212efabbfac128adccee.zip |
Replace copy loop by std::copy
-rw-r--r-- | src/VLCInput.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/VLCInput.cpp b/src/VLCInput.cpp index a370c78..99f86f1 100644 --- a/src/VLCInput.cpp +++ b/src/VLCInput.cpp @@ -186,9 +186,8 @@ ssize_t VLCInput::m_read(uint8_t* buf, size_t length) boost::mutex::scoped_lock lock(m_queue_mutex); if (m_queue.size() >= length) { - for (size_t i = 0; i < length; i++) { - buf[i] = m_queue[i]; - } + std::copy(m_queue.begin(), m_queue.begin() + length, buf); + m_queue.erase(m_queue.begin(), m_queue.begin() + length); return length; |