lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 24e62d4 2/2: Stop using boost::bind1st()


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 24e62d4 2/2: Stop using boost::bind1st()
Date: Fri, 20 Jan 2017 19:14:46 +0000 (UTC)

branch: master
commit 24e62d4180594c28410370ef3efcbc5f283d7c60
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Stop using boost::bind1st()
---
 msw_workarounds.cpp |   29 ++++++++++++-----------------
 1 file changed, 12 insertions(+), 17 deletions(-)

diff --git a/msw_workarounds.cpp b/msw_workarounds.cpp
index 63bd78d..3572940 100644
--- a/msw_workarounds.cpp
+++ b/msw_workarounds.cpp
@@ -30,12 +30,8 @@
 #include "fenv_lmi.hpp"
 #include "handle_exceptions.hpp"
 
-#include <boost/functional.hpp>
-
 #include <windows.h>
 
-#include <algorithm>
-#include <functional>
 #include <iostream>                     // std::cout, std::endl
 #include <iterator>                     // std::istream_iterator
 #include <sstream>
@@ -46,11 +42,10 @@ MswDllPreloader::MswDllPreloader()
 
 MswDllPreloader::~MswDllPreloader()
 {
-    std::for_each
-        (SuccessfullyPreloadedDlls_.begin()
-        ,SuccessfullyPreloadedDlls_.end()
-        ,boost::bind1st(std::mem_fun(&MswDllPreloader::UnloadOneDll), this)
-        );
+    for(auto const& i : SuccessfullyPreloadedDlls_)
+        {
+        UnloadOneDll(i);
+        }
 }
 
 MswDllPreloader& MswDllPreloader::instance()
@@ -70,14 +65,14 @@ MswDllPreloader& MswDllPreloader::instance()
 
 void MswDllPreloader::PreloadDesignatedDlls()
 {
-    std::istringstream iss
-        (configurable_settings::instance().libraries_to_preload()
-        );
-    std::for_each
-        (std::istream_iterator<std::string>(iss)
-        ,std::istream_iterator<std::string>()
-        ,boost::bind1st(std::mem_fun(&MswDllPreloader::PreloadOneDll), this)
-        );
+    configurable_settings const& c = configurable_settings::instance();
+    std::istringstream iss(c.libraries_to_preload());
+    std::istream_iterator<std::string> i(iss);
+    std::istream_iterator<std::string> const eos;
+    for(; eos != i; ++i)
+        {
+        PreloadOneDll(*i);
+        }
     fenv_initialize();
 }
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]