remove (almost) all BOOST_FOREACH calls

This commit is contained in:
Dennis Luxen
2014-05-07 16:17:47 +02:00
parent e3244dd649
commit 9710f39cad
12 changed files with 32 additions and 45 deletions
+1 -1
View File
@@ -231,7 +231,7 @@ void Connection::compressBufferCollection(
boost::iostreams::back_inserter(compressed_data)
);
BOOST_FOREACH( const std::string & line, uncompressed_data) {
for ( const std::string & line : uncompressed_data) {
compressing_stream << line;
}
+4 -6
View File
@@ -25,8 +25,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <boost/foreach.hpp>
#include <osrm/Reply.h>
#include "../../Util/StringUtil.h"
@@ -34,7 +32,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace http {
void Reply::setSize(const unsigned size) {
BOOST_FOREACH ( Header& h, headers) {
for ( Header& h : headers) {
if("Content-Length" == h.name) {
intToString(size,h.value);
}
@@ -45,7 +43,7 @@ void Reply::setSize(const unsigned size) {
void Reply::SetUncompressedSize()
{
unsigned uncompressed_size = 0;
BOOST_FOREACH ( const std::string & current_line, content)
for ( const std::string & current_line : content)
{
uncompressed_size += current_line.size();
}
@@ -56,14 +54,14 @@ void Reply::SetUncompressedSize()
std::vector<boost::asio::const_buffer> Reply::toBuffers(){
std::vector<boost::asio::const_buffer> buffers;
buffers.push_back(ToBuffer(status));
BOOST_FOREACH(const Header & h, headers) {
for (const Header & h : headers) {
buffers.push_back(boost::asio::buffer(h.name));
buffers.push_back(boost::asio::buffer(seperators));
buffers.push_back(boost::asio::buffer(h.value));
buffers.push_back(boost::asio::buffer(crlf));
}
buffers.push_back(boost::asio::buffer(crlf));
BOOST_FOREACH(const std::string & line, content) {
for (const std::string & line : content) {
buffers.push_back(boost::asio::buffer(line));
}
return buffers;
-2
View File
@@ -37,8 +37,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <osrm/Reply.h>
#include <osrm/RouteParameters.h>
#include <boost/foreach.hpp>
#include <algorithm>
#include <iostream>