From d23445348bf04a698e062a3b917360313ecbcaad Mon Sep 17 00:00:00 2001 From: Joel Holdsworth Date: Fri, 23 May 2014 23:32:20 +0100 Subject: [PATCH] Replaced boost::function with std::function --- pv/prop/binding/deviceoptions.cpp | 2 +- pv/prop/binding/deviceoptions.h | 3 +-- pv/prop/property.h | 6 ++---- pv/sigsession.cpp | 2 +- pv/sigsession.h | 8 +++----- pv/storesession.cpp | 2 ++ pv/view/logicsignal.cpp | 3 ++- pv/view/viewport.cpp | 2 ++ 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/pv/prop/binding/deviceoptions.cpp b/pv/prop/binding/deviceoptions.cpp index a1ae6ba..39e1281 100644 --- a/pv/prop/binding/deviceoptions.cpp +++ b/pv/prop/binding/deviceoptions.cpp @@ -35,7 +35,7 @@ #include using boost::bind; -using boost::function; +using std::function; using boost::optional; using std::make_pair; using std::pair; diff --git a/pv/prop/binding/deviceoptions.h b/pv/prop/binding/deviceoptions.h index f0ba92e..1e422f6 100644 --- a/pv/prop/binding/deviceoptions.h +++ b/pv/prop/binding/deviceoptions.h @@ -21,7 +21,6 @@ #ifndef PULSEVIEW_PV_PROP_BINDING_DEVICEOPTIONS_H #define PULSEVIEW_PV_PROP_BINDING_DEVICEOPTIONS_H -#include #include #include @@ -52,7 +51,7 @@ private: void bind_bool(const QString &name, int key); void bind_enum(const QString &name, int key, GVariant *const gvar_list, - boost::function printer = print_gvariant); + std::function printer = print_gvariant); void bind_int(const QString &name, int key, QString suffix, boost::optional< std::pair > range); diff --git a/pv/prop/property.h b/pv/prop/property.h index 0b4bc7b..e5a523f 100644 --- a/pv/prop/property.h +++ b/pv/prop/property.h @@ -23,8 +23,6 @@ #include -#include - #include #include @@ -38,8 +36,8 @@ class Property : public QObject Q_OBJECT; public: - typedef boost::function Getter; - typedef boost::function Setter; + typedef std::function Getter; + typedef std::function Setter; protected: Property(QString name, Getter getter, Setter setter); diff --git a/pv/sigsession.cpp b/pv/sigsession.cpp index 84e1d48..cbcbaa8 100644 --- a/pv/sigsession.cpp +++ b/pv/sigsession.cpp @@ -47,8 +47,8 @@ #include -using boost::function; using std::dynamic_pointer_cast; +using std::function; using std::lock_guard; using std::mutex; using std::list; diff --git a/pv/sigsession.h b/pv/sigsession.h index 10d1e23..927b2e7 100644 --- a/pv/sigsession.h +++ b/pv/sigsession.h @@ -21,8 +21,6 @@ #ifndef PULSEVIEW_PV_SIGSESSION_H #define PULSEVIEW_PV_SIGSESSION_H -#include - #include #include #include @@ -94,7 +92,7 @@ public: capture_state get_capture_state() const; - void start_capture(boost::function error_handler); + void start_capture(std::function error_handler); void stop_capture(); @@ -135,11 +133,11 @@ private: static sr_input* load_input_file_format( const std::string &filename, - boost::function error_handler, + std::function error_handler, sr_input_format *format = NULL); void sample_thread_proc(std::shared_ptr dev_inst, - boost::function error_handler); + std::function error_handler); void feed_in_header(const sr_dev_inst *sdi); diff --git a/pv/storesession.cpp b/pv/storesession.cpp index a975134..5eaff58 100644 --- a/pv/storesession.cpp +++ b/pv/storesession.cpp @@ -18,6 +18,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include + #include "storesession.h" #include diff --git a/pv/view/logicsignal.cpp b/pv/view/logicsignal.cpp index 8363383..77771f8 100644 --- a/pv/view/logicsignal.cpp +++ b/pv/view/logicsignal.cpp @@ -20,7 +20,8 @@ #include -#include +#include +#include #include #include diff --git a/pv/view/viewport.cpp b/pv/view/viewport.cpp index f8d5681..c578963 100644 --- a/pv/view/viewport.cpp +++ b/pv/view/viewport.cpp @@ -18,6 +18,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include + #include "view.h" #include "viewport.h" -- 2.30.2