Remove unused "using" declarations.
authorUwe Hermann <uwe@hermann-uwe.de>
Mon, 20 Mar 2017 20:00:14 +0000 (21:00 +0100)
committerUwe Hermann <uwe@hermann-uwe.de>
Thu, 23 Mar 2017 16:59:00 +0000 (17:59 +0100)
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)

25 files changed:
pv/binding/device.cpp
pv/data/decoderstack.cpp
pv/data/logicsegment.cpp
pv/data/segment.cpp
pv/devicemanager.cpp
pv/devices/device.cpp
pv/devices/hardwaredevice.cpp
pv/dialogs/connect.cpp
pv/mainwindow.cpp
pv/popups/channels.cpp
pv/session.cpp
pv/session.hpp
pv/storesession.cpp
pv/toolbars/mainbar.cpp
pv/view/cursor.cpp
pv/view/decodetrace.cpp
pv/view/header.cpp
pv/view/logicsignal.cpp
pv/view/tracetreeitemowner.cpp
pv/view/view.cpp
pv/view/viewitemowner.cpp
pv/view/viewport.cpp
test/data/analogsegment.cpp
test/data/decoderstack.cpp
test/data/logicsegment.cpp

index fe08d2b4ab48a8c91e1543ee971ea398ae6eda4e..845708e59626f3dea41fdbc183c7424ef0f87ccf 100644 (file)
@@ -24,7 +24,6 @@
 #include "device.hpp"
 
 #include <pv/prop/bool.hpp>
-#include <pv/prop/double.hpp>
 #include <pv/prop/enum.hpp>
 #include <pv/prop/int.hpp>
 
@@ -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;
index 3499baf22205cb1d0338f8d77d8645ab7d437cbd..4d9eb000135f86d23a73b5a90dd6104fdc28a7e1 100644 (file)
@@ -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;
index 25aa2d0aa445bd2671129e60d51585f746dda6a2..db2ce0548fcbedcd4023e7532bc4e999bf3b35a7 100644 (file)
@@ -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;
 
index 86211f8218f52d02eb8ed59df0e2eecf998379a9..ceaf0a056ef84a2c8f473f1d664559b4e583ce1e 100644 (file)
 #include <cassert>
 #include <cstdlib>
 #include <cstring>
-#include <vector>
 
 using std::lock_guard;
 using std::min;
 using std::recursive_mutex;
-using std::vector;
 
 namespace pv {
 namespace data {
index bd41eb8db2135c37db45d0e4cd44a3e9e6af6bb4..883175c7752eb8cf27767a254d285da3760eb539 100644 (file)
 #include <stdexcept>
 #include <sstream>
 #include <string>
-#include <vector>
 
 #include <libsigrokcxx/libsigrokcxx.hpp>
 
-#include <boost/algorithm/string/join.hpp>
 #include <boost/filesystem.hpp>
 
 #include <pv/devices/hardwaredevice.hpp>
 
-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 {
 
index de489bc2a6f292c909b5156c4b9676f0fd8a0d08..855a1d82fca65019952b1baf46f21aef60c859de 100644 (file)
 
 #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;
index 0ed5c4ae3ee4cb5f6339505c9e640c03ab3fe69c..ff52f817327d6d0d5790c91675e764d1d6091212 100644 (file)
@@ -27,7 +27,6 @@
 
 #include "hardwaredevice.hpp"
 
-using std::dynamic_pointer_cast;
 using std::shared_ptr;
 using std::static_pointer_cast;
 using std::string;
index 46df783dbe1361092f76b4ddacd0bb5f438bf9ef..7a680cf73fb48efaf817738c18c54ab399f12f03 100644 (file)
@@ -41,7 +41,6 @@ using Glib::VariantBase;
 
 using sigrok::ConfigKey;
 using sigrok::Driver;
-using sigrok::Error;
 
 using pv::devices::HardwareDevice;
 
index 46f8a123ae8907b7d3793dd0b47eac9d3ba3bf1f..dd8be229e97acc9b29065124d6431b103c145b84 100644 (file)
@@ -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;
index 9c200b9db31eb5d1c6a3e35cafcc85b1ec2cdbbf..0251a9d17a0d6604a666afc02c40b4f80c58c5be 100644 (file)
@@ -24,8 +24,6 @@
 #define NOGDI
 #define NORESOURCE
 #endif
-#include <boost/thread/locks.hpp>
-#include <boost/thread/shared_mutex.hpp>
 
 #include <QCheckBox>
 #include <QFormLayout>
 
 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;
index a1a078788c4e49631e7d00df1ab5e82646a6cbe3..0fef9c91764bc75366bc8db57cfd6880783465b3 100644 (file)
@@ -22,8 +22,6 @@
 #define NOGDI
 #define NORESOURCE
 #endif
-#include <boost/thread/locks.hpp>
-#include <boost/thread/shared_mutex.hpp>
 
 #include <QFileInfo>
 
 #include <libsigrokdecode/libsigrokdecode.h>
 #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) :
index 4ac7f509b516dcf18b4738753b1dd5038041f6ec..7229c7e337f3ec71efa1041d9799b3c3e4fe2c42 100644 (file)
@@ -34,7 +34,6 @@
 #define NOGDI
 #define NORESOURCE
 #endif
-#include <boost/thread/shared_mutex.hpp>
 
 #include <QObject>
 #include <QSettings>
index 3c5d899f2ce71a410a5e8845dbecbb703d2389e1..8916cb8cd154e078837cef5174813e8e4bd38d1c 100644 (file)
@@ -24,8 +24,6 @@
 #define NOGDI
 #define NORESOURCE
 #endif
-#include <boost/thread/locks.hpp>
-#include <boost/thread/shared_mutex.hpp>
 
 #include "storesession.hpp"
 
 
 #include <libsigrokcxx/libsigrokcxx.hpp>
 
-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;
index 736ef80b1f4ffb9f64ffadbb574cb422eeafa512..f3bbcee1b90490af234be2db0bc9e1bac2759173 100644 (file)
@@ -56,9 +56,7 @@
 #include <libsigrokcxx/libsigrokcxx.hpp>
 
 using std::back_inserter;
-using std::cerr;
 using std::copy;
-using std::endl;
 using std::list;
 using std::make_pair;
 using std::map;
index 0376c2d40d7badbefefd632bbd0e42437248b6be..d845817de8fcd53898c9d3248497128220ef4041 100644 (file)
@@ -34,9 +34,8 @@
 #include <cstdio>
 #include <limits>
 
-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 {
index 0d8a0edbb993ab5982c901dca4c7f4fdfbf6f408..670d6ef1dcb3b5b8b66c79516c93b2be8d322815 100644 (file)
@@ -28,8 +28,6 @@ extern "C" {
 #include <tuple>
 
 #include <boost/functional/hash.hpp>
-#include <boost/thread/locks.hpp>
-#include <boost/thread/shared_mutex.hpp>
 
 #include <QAction>
 #include <QApplication>
@@ -54,13 +52,9 @@ extern "C" {
 #include <pv/widgets/decodergroupbox.hpp>
 #include <pv/widgets/decodermenu.hpp>
 
-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;
index ad91cd12f8c5df760058f121e0c2c30302efd43e..28f8130d16d562a586e8d18765518d98cc840f4c 100644 (file)
@@ -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;
index 440a11903d4277f15d6dfeff6961630d20bfa868..f7046ce5f5406e1c75b42e7cf1e82822c9477d08 100644 (file)
@@ -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;
 
index c87619524574e02f7039ae60b4d8434a592d74f6..31f4cb8331927133bca9073a34d16b24ac9fecbb 100644 (file)
 #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;
index ae37b912ca984c0d13f2ff371bfe53e5baa5fb3c..9e2aeaa87af8c4319447e564009cd4332915aca8 100644 (file)
 #include <cmath>
 #include <iostream>
 #include <iterator>
-#include <mutex>
 #include <unordered_set>
 
 #include <boost/archive/text_iarchive.hpp>
 #include <boost/archive/text_oarchive.hpp>
 #include <boost/serialization/serialization.hpp>
-#include <boost/thread/locks.hpp>
 
 #include <QApplication>
 #include <QHBoxLayout>
@@ -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 {
index fe8fbfc7a291bd62091d8ec7d0154749418832da..7b32d92cc6ef5c1af93522b2013226a8fe4ba847 100644 (file)
 #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 {
index 2d10f2a054fadb31dc47783d3395460c54fb2c0a..d3f25aa6ba2bb82e07aa0afd1a389f6a13f9c6f9 100644 (file)
@@ -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;
index 8a5e0f7d80a37f84c3851e5c7f43f5fc8444e371..08b87e51639cd06fb622ecb8515e58cfe8817cd3 100644 (file)
@@ -17,6 +17,7 @@
  * along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
+#if 0
 #include <extdef.h>
 
 #include <cstdint>
@@ -27,7 +28,6 @@
 
 using pv::data::AnalogSegment;
 
-#if 0
 BOOST_AUTO_TEST_SUITE(AnalogSegmentTest)
 
 void push_analog(AnalogSegment &s, unsigned int num_samples,
index 8af1c619d320febf6dc5cb3b7ebafbf7ae84a981..3bb2f3eb310d52f525845142cd52baf51e109a8a 100644 (file)
@@ -17,6 +17,8 @@
  * along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
+#if 0
+
 #include <libsigrokdecode/libsigrokdecode.h> /* First, so we avoid a _POSIX_C_SOURCE warning. */
 #include <boost/test/unit_test.hpp>
 
@@ -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)
index b634257c17eaa278d261e560f7fb6a5c776c5cc6..848cc5a534f2e6867825a254eefa710cf99ef1ae 100644 (file)
 
 #include <pv/data/logicsegment.hpp>
 
+#if 0
 using pv::data::LogicSegment;
 using std::vector;
+#endif
 
 // Dummy, remove again when unit tests are fixed.
 BOOST_AUTO_TEST_SUITE(DummyTestSuite)