From: Uwe Hermann Date: Mon, 20 Mar 2017 20:00:14 +0000 (+0100) Subject: Remove unused "using" declarations. X-Git-Tag: pulseview-0.4.0~128 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=83b1c8d251386ac1980284c4668cbdd8e425550f;p=pulseview.git Remove unused "using" declarations. This patch was generated using clang-tidy: clang-tidy -checks="-*,misc-unused-using-decls" -fix (with manual add-on fixes such as dropping unused headers as well, and commenting some false-positive cases) --- diff --git a/pv/binding/device.cpp b/pv/binding/device.cpp index fe08d2b4..845708e5 100644 --- a/pv/binding/device.cpp +++ b/pv/binding/device.cpp @@ -24,7 +24,6 @@ #include "device.hpp" #include -#include #include #include @@ -46,7 +45,6 @@ using sigrok::ConfigKey; using sigrok::Error; using pv::prop::Bool; -using pv::prop::Double; using pv::prop::Enum; using pv::prop::Int; using pv::prop::Property; diff --git a/pv/data/decoderstack.cpp b/pv/data/decoderstack.cpp index 3499baf2..4d9eb000 100644 --- a/pv/data/decoderstack.cpp +++ b/pv/data/decoderstack.cpp @@ -40,8 +40,6 @@ using std::make_pair; using std::max; using std::min; using std::list; -using std::map; -using std::pair; using std::shared_ptr; using std::make_shared; using std::vector; diff --git a/pv/data/logicsegment.cpp b/pv/data/logicsegment.cpp index 25aa2d0a..db2ce054 100644 --- a/pv/data/logicsegment.cpp +++ b/pv/data/logicsegment.cpp @@ -33,7 +33,6 @@ using std::lock_guard; using std::recursive_mutex; using std::max; using std::min; -using std::pair; using std::shared_ptr; using std::vector; diff --git a/pv/data/segment.cpp b/pv/data/segment.cpp index 86211f82..ceaf0a05 100644 --- a/pv/data/segment.cpp +++ b/pv/data/segment.cpp @@ -23,12 +23,10 @@ #include #include #include -#include using std::lock_guard; using std::min; using std::recursive_mutex; -using std::vector; namespace pv { namespace data { diff --git a/pv/devicemanager.cpp b/pv/devicemanager.cpp index bd41eb8d..883175c7 100644 --- a/pv/devicemanager.cpp +++ b/pv/devicemanager.cpp @@ -25,35 +25,26 @@ #include #include #include -#include #include -#include #include #include -using boost::algorithm::join; - using std::bind; -using std::dynamic_pointer_cast; using std::list; using std::map; using std::placeholders::_1; using std::placeholders::_2; -using std::remove_if; -using std::runtime_error; using std::shared_ptr; using std::string; -using std::vector; using Glib::VariantBase; using sigrok::ConfigKey; using sigrok::Context; using sigrok::Driver; -using sigrok::SessionDevice; namespace pv { diff --git a/pv/devices/device.cpp b/pv/devices/device.cpp index de489bc2..855a1d82 100644 --- a/pv/devices/device.cpp +++ b/pv/devices/device.cpp @@ -23,13 +23,10 @@ #include "device.hpp" -using std::map; -using std::set; using std::shared_ptr; using sigrok::ConfigKey; using sigrok::Capability; -using sigrok::Error; using Glib::VariantBase; using Glib::Variant; diff --git a/pv/devices/hardwaredevice.cpp b/pv/devices/hardwaredevice.cpp index 0ed5c4ae..ff52f817 100644 --- a/pv/devices/hardwaredevice.cpp +++ b/pv/devices/hardwaredevice.cpp @@ -27,7 +27,6 @@ #include "hardwaredevice.hpp" -using std::dynamic_pointer_cast; using std::shared_ptr; using std::static_pointer_cast; using std::string; diff --git a/pv/dialogs/connect.cpp b/pv/dialogs/connect.cpp index 46df783d..7a680cf7 100644 --- a/pv/dialogs/connect.cpp +++ b/pv/dialogs/connect.cpp @@ -41,7 +41,6 @@ using Glib::VariantBase; using sigrok::ConfigKey; using sigrok::Driver; -using sigrok::Error; using pv::devices::HardwareDevice; diff --git a/pv/mainwindow.cpp b/pv/mainwindow.cpp index 46f8a123..dd8be229 100644 --- a/pv/mainwindow.cpp +++ b/pv/mainwindow.cpp @@ -52,7 +52,6 @@ using std::bind; using std::dynamic_pointer_cast; -using std::list; using std::make_shared; using std::map; using std::placeholders::_1; diff --git a/pv/popups/channels.cpp b/pv/popups/channels.cpp index 9c200b9d..0251a9d1 100644 --- a/pv/popups/channels.cpp +++ b/pv/popups/channels.cpp @@ -24,8 +24,6 @@ #define NOGDI #define NORESOURCE #endif -#include -#include #include #include @@ -44,12 +42,7 @@ using namespace Qt; -using boost::shared_lock; -using boost::shared_mutex; -using std::lock_guard; using std::map; -using std::mutex; -using std::set; using std::shared_ptr; using std::make_shared; using std::unordered_set; diff --git a/pv/session.cpp b/pv/session.cpp index a1a07878..0fef9c91 100644 --- a/pv/session.cpp +++ b/pv/session.cpp @@ -22,8 +22,6 @@ #define NOGDI #define NORESOURCE #endif -#include -#include #include @@ -62,10 +60,6 @@ #include #endif -using boost::shared_lock; -using boost::shared_mutex; -using boost::unique_lock; - using std::bad_alloc; using std::dynamic_pointer_cast; using std::find_if; @@ -81,7 +75,6 @@ using std::mutex; using std::pair; using std::recursive_mutex; using std::runtime_error; -using std::set; using std::shared_ptr; using std::string; using std::unordered_set; @@ -92,18 +85,13 @@ using sigrok::Channel; using sigrok::ConfigKey; using sigrok::DatafeedCallbackFunction; using sigrok::Error; -using sigrok::Header; using sigrok::InputFormat; using sigrok::Logic; using sigrok::Meta; -using sigrok::OutputFormat; using sigrok::Packet; -using sigrok::PacketPayload; using sigrok::Session; -using sigrok::SessionDevice; using Glib::VariantBase; -using Glib::Variant; namespace pv { Session::Session(DeviceManager &device_manager, QString name) : diff --git a/pv/session.hpp b/pv/session.hpp index 4ac7f509..7229c7e3 100644 --- a/pv/session.hpp +++ b/pv/session.hpp @@ -34,7 +34,6 @@ #define NOGDI #define NORESOURCE #endif -#include #include #include diff --git a/pv/storesession.cpp b/pv/storesession.cpp index 3c5d899f..8916cb8c 100644 --- a/pv/storesession.cpp +++ b/pv/storesession.cpp @@ -24,8 +24,6 @@ #define NOGDI #define NORESOURCE #endif -#include -#include #include "storesession.hpp" @@ -40,11 +38,7 @@ #include -using boost::shared_lock; -using boost::shared_mutex; - using std::deque; -using std::dynamic_pointer_cast; using std::ios_base; using std::lock_guard; using std::make_pair; @@ -52,7 +46,6 @@ using std::map; using std::min; using std::mutex; using std::pair; -using std::set; using std::shared_ptr; using std::string; using std::unordered_set; diff --git a/pv/toolbars/mainbar.cpp b/pv/toolbars/mainbar.cpp index 736ef80b..f3bbcee1 100644 --- a/pv/toolbars/mainbar.cpp +++ b/pv/toolbars/mainbar.cpp @@ -56,9 +56,7 @@ #include using std::back_inserter; -using std::cerr; using std::copy; -using std::endl; using std::list; using std::make_pair; using std::map; diff --git a/pv/view/cursor.cpp b/pv/view/cursor.cpp index 0376c2d4..d845817d 100644 --- a/pv/view/cursor.cpp +++ b/pv/view/cursor.cpp @@ -34,9 +34,8 @@ #include #include -using std::abs; +using std::abs; // Force usage of std::abs() instead of C's abs(). using std::shared_ptr; -using std::numeric_limits; namespace pv { namespace views { diff --git a/pv/view/decodetrace.cpp b/pv/view/decodetrace.cpp index 0d8a0edb..670d6ef1 100644 --- a/pv/view/decodetrace.cpp +++ b/pv/view/decodetrace.cpp @@ -28,8 +28,6 @@ extern "C" { #include #include -#include -#include #include #include @@ -54,13 +52,9 @@ extern "C" { #include #include -using boost::shared_lock; -using boost::shared_mutex; using std::all_of; -using std::dynamic_pointer_cast; using std::list; -using std::lock_guard; using std::make_pair; using std::max; using std::make_pair; diff --git a/pv/view/header.cpp b/pv/view/header.cpp index ad91cd12..28f8130d 100644 --- a/pv/view/header.cpp +++ b/pv/view/header.cpp @@ -41,10 +41,6 @@ using boost::make_filter_iterator; using std::count_if; using std::dynamic_pointer_cast; -using std::max; -using std::make_pair; -using std::min; -using std::pair; using std::shared_ptr; using std::stable_sort; using std::vector; diff --git a/pv/view/logicsignal.cpp b/pv/view/logicsignal.cpp index 440a1190..f7046ce5 100644 --- a/pv/view/logicsignal.cpp +++ b/pv/view/logicsignal.cpp @@ -53,9 +53,7 @@ using std::vector; using sigrok::ConfigKey; using sigrok::Capability; -using sigrok::Error; using sigrok::Trigger; -using sigrok::TriggerStage; using sigrok::TriggerMatch; using sigrok::TriggerMatchType; diff --git a/pv/view/tracetreeitemowner.cpp b/pv/view/tracetreeitemowner.cpp index c8761952..31f4cb83 100644 --- a/pv/view/tracetreeitemowner.cpp +++ b/pv/view/tracetreeitemowner.cpp @@ -23,13 +23,11 @@ #include "tracetreeitemowner.hpp" #include "trace.hpp" -using std::dynamic_pointer_cast; using std::find; using std::make_pair; using std::max; using std::min; using std::pair; -using std::set; using std::shared_ptr; using std::static_pointer_cast; using std::vector; diff --git a/pv/view/view.cpp b/pv/view/view.cpp index ae37b912..9e2aeaa8 100644 --- a/pv/view/view.cpp +++ b/pv/view/view.cpp @@ -29,13 +29,11 @@ #include #include #include -#include #include #include #include #include -#include #include #include @@ -67,8 +65,6 @@ #include "decodetrace.hpp" #endif -using boost::shared_lock; -using boost::shared_mutex; using pv::data::SignalData; using pv::data::Segment; @@ -78,11 +74,8 @@ using pv::util::Timestamp; using std::back_inserter; using std::copy_if; using std::count_if; -using std::deque; using std::dynamic_pointer_cast; using std::inserter; -using std::list; -using std::lock_guard; using std::max; using std::make_pair; using std::make_shared; @@ -95,7 +88,6 @@ using std::stringstream; using std::unordered_map; using std::unordered_set; using std::vector; -using std::weak_ptr; namespace pv { namespace views { diff --git a/pv/view/viewitemowner.cpp b/pv/view/viewitemowner.cpp index fe8fbfc7..7b32d92c 100644 --- a/pv/view/viewitemowner.cpp +++ b/pv/view/viewitemowner.cpp @@ -23,15 +23,6 @@ #include "tracetreeitemowner.hpp" #include "trace.hpp" -using std::dynamic_pointer_cast; -using std::max; -using std::make_pair; -using std::min; -using std::pair; -using std::set; -using std::shared_ptr; -using std::vector; - namespace pv { namespace views { namespace TraceView { diff --git a/pv/view/viewport.cpp b/pv/view/viewport.cpp index 2d10f2a0..d3f25aa6 100644 --- a/pv/view/viewport.cpp +++ b/pv/view/viewport.cpp @@ -37,10 +37,7 @@ using std::abs; using std::back_inserter; using std::copy; using std::dynamic_pointer_cast; -using std::max; -using std::min; -using std::none_of; -using std::numeric_limits; +using std::none_of; // Used in assert()s. using std::shared_ptr; using std::stable_sort; using std::vector; diff --git a/test/data/analogsegment.cpp b/test/data/analogsegment.cpp index 8a5e0f7d..08b87e51 100644 --- a/test/data/analogsegment.cpp +++ b/test/data/analogsegment.cpp @@ -17,6 +17,7 @@ * along with this program; if not, see . */ +#if 0 #include #include @@ -27,7 +28,6 @@ using pv::data::AnalogSegment; -#if 0 BOOST_AUTO_TEST_SUITE(AnalogSegmentTest) void push_analog(AnalogSegment &s, unsigned int num_samples, diff --git a/test/data/decoderstack.cpp b/test/data/decoderstack.cpp index 8af1c619..3bb2f3eb 100644 --- a/test/data/decoderstack.cpp +++ b/test/data/decoderstack.cpp @@ -17,6 +17,8 @@ * along with this program; if not, see . */ +#if 0 + #include /* First, so we avoid a _POSIX_C_SOURCE warning. */ #include @@ -33,7 +35,6 @@ using pv::view::DecodeTrace; using std::shared_ptr; using std::vector; -#if 0 BOOST_AUTO_TEST_SUITE(DecoderStackTest) BOOST_AUTO_TEST_CASE(TwoDecoderStack) diff --git a/test/data/logicsegment.cpp b/test/data/logicsegment.cpp index b634257c..848cc5a5 100644 --- a/test/data/logicsegment.cpp +++ b/test/data/logicsegment.cpp @@ -25,8 +25,10 @@ #include +#if 0 using pv::data::LogicSegment; using std::vector; +#endif // Dummy, remove again when unit tests are fixed. BOOST_AUTO_TEST_SUITE(DummyTestSuite)