From: Joel Holdsworth Date: Fri, 23 May 2014 22:32:20 +0000 (+0100) Subject: Replaced boost::function with std::function X-Git-Tag: pulseview-0.3.0~609 X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=commitdiff_plain;h=d23445348bf04a698e062a3b917360313ecbcaad Replaced boost::function with std::function --- diff --git a/pv/prop/binding/deviceoptions.cpp b/pv/prop/binding/deviceoptions.cpp index a1ae6ba7..39e12816 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 f0ba92ef..1e422f67 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 0b4bc7b0..e5a523f9 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 84e1d48f..cbcbaa88 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 10d1e23d..927b2e7c 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 a9751343..5eaff586 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 8363383a..77771f82 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 f8d56810..c5789630 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"