diff options
author | Mario J. Rugiero <mrugiero@gmail.com> | 2015-11-09 11:37:26 -0300 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-11-10 10:35:14 +0000 |
commit | b62f1bd5bf850ce18bafa332d5da121939bb5133 (patch) | |
tree | 5d2bd63a2e07005aac07bfc09c02913ac8405a1b /io | |
parent | 986c495052d165308f9cd1039cf6f6d9b8dbcf7c (diff) |
Replaced for_each and algorithm include by range based loop and exception.
Since the only thing used from algorithm was std::for_each, and std::exception
was being used without including it.
Change-Id: Ida415bfbcae2b14811183a6afa46b6f6e1ac6ab2
Reviewed-on: https://gerrit.libreoffice.org/19864
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'io')
-rw-r--r-- | io/source/acceptor/acc_socket.cxx | 5 | ||||
-rw-r--r-- | io/source/connector/ctr_socket.cxx | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/io/source/acceptor/acc_socket.cxx b/io/source/acceptor/acc_socket.cxx index a5321eb88d80..976b7826f05d 100644 --- a/io/source/acceptor/acc_socket.cxx +++ b/io/source/acceptor/acc_socket.cxx @@ -19,7 +19,7 @@ #include "acceptor.hxx" -#include <algorithm> +#include <exception> #include <unordered_set> #include <osl/mutex.hxx> @@ -123,7 +123,8 @@ namespace io_acceptor { } } - ::std::for_each(listeners.begin(), listeners.end(), t); + for(auto& listener : listeners) + t(listener); } static void callStarted(Reference<XStreamListener> xStreamListener) diff --git a/io/source/connector/ctr_socket.cxx b/io/source/connector/ctr_socket.cxx index 6b53436e0c01..3d7e320575f1 100644 --- a/io/source/connector/ctr_socket.cxx +++ b/io/source/connector/ctr_socket.cxx @@ -20,7 +20,7 @@ #include "connector.hxx" #include <rtl/ustrbuf.hxx> -#include <algorithm> +#include <exception> using namespace ::osl; using namespace ::com::sun::star::uno; @@ -43,7 +43,8 @@ namespace stoc_connector { } } - ::std::for_each(listeners.begin(), listeners.end(), t); + for(auto& listener : listeners) + t(listener); } |