From: Uwe Hermann Date: Thu, 17 Jan 2019 23:13:47 +0000 (+0100) Subject: Avoid "using namespace std" everywhere. X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=f638442b87a5e4441216296dd857f89b7aef42ba;p=libsigrokflow.git Avoid "using namespace std" everywhere. --- diff --git a/include/libsigrokflow/legacy_capture_device.hpp b/include/libsigrokflow/legacy_capture_device.hpp index 03ff571..715bea0 100644 --- a/include/libsigrokflow/legacy_capture_device.hpp +++ b/include/libsigrokflow/legacy_capture_device.hpp @@ -33,7 +33,7 @@ namespace Srf { -using namespace std; +using std::shared_ptr; #ifdef HAVE_LIBSIGROKCXX class LegacyCaptureDevice : diff --git a/include/libsigrokflow/legacy_decoder.hpp b/include/libsigrokflow/legacy_decoder.hpp index fecff05..f465c22 100644 --- a/include/libsigrokflow/legacy_decoder.hpp +++ b/include/libsigrokflow/legacy_decoder.hpp @@ -33,7 +33,7 @@ namespace Srf { -using namespace std; +using std::shared_ptr; #ifdef HAVE_LIBSIGROKDECODE class LegacyDecoder : diff --git a/include/libsigrokflow/legacy_input.hpp b/include/libsigrokflow/legacy_input.hpp index 2516adc..f8ed3fe 100644 --- a/include/libsigrokflow/legacy_input.hpp +++ b/include/libsigrokflow/legacy_input.hpp @@ -33,7 +33,9 @@ namespace Srf { -using namespace std; +using std::map; +using std::shared_ptr; +using std::string; #ifdef HAVE_LIBSIGROKCXX class LegacyInput : diff --git a/include/libsigrokflow/legacy_output.hpp b/include/libsigrokflow/legacy_output.hpp index 7e78bda..a8da16e 100644 --- a/include/libsigrokflow/legacy_output.hpp +++ b/include/libsigrokflow/legacy_output.hpp @@ -33,7 +33,9 @@ namespace Srf { -using namespace std; +using std::map; +using std::shared_ptr; +using std::string; #ifdef HAVE_LIBSIGROKCXX class LegacyOutput : diff --git a/src/init.cpp b/src/init.cpp index 0c3daca..d4c89eb 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -29,7 +29,7 @@ namespace Srf { -using namespace std; +using std::runtime_error; static bool srf_initialized_ = false; diff --git a/src/legacy_capture_device.cpp b/src/legacy_capture_device.cpp index 419a69a..2f5ce0b 100644 --- a/src/legacy_capture_device.cpp +++ b/src/legacy_capture_device.cpp @@ -29,8 +29,12 @@ namespace Srf { -using namespace std; -using namespace std::placeholders; +using std::move; +using std::placeholders::_1; +using std::placeholders::_2; +using std::runtime_error; +using std::shared_ptr; +using std::static_pointer_cast; #ifdef HAVE_LIBSIGROKCXX void LegacyCaptureDevice::class_init(Gst::ElementClass *klass) diff --git a/src/legacy_decoder.cpp b/src/legacy_decoder.cpp index 500ae49..ac3474f 100644 --- a/src/legacy_decoder.cpp +++ b/src/legacy_decoder.cpp @@ -26,7 +26,7 @@ namespace Srf { -using namespace std; +using std::runtime_error; #ifdef HAVE_LIBSIGROKDECODE void LegacyDecoder::class_init(Gst::ElementClass *klass) diff --git a/src/legacy_input.cpp b/src/legacy_input.cpp index b2e59a7..e862ca4 100644 --- a/src/legacy_input.cpp +++ b/src/legacy_input.cpp @@ -31,8 +31,14 @@ namespace Srf { -using namespace std; -using namespace std::placeholders; +using std::map; +using std::move; +using std::placeholders::_1; +using std::placeholders::_2; +using std::runtime_error; +using std::shared_ptr; +using std::static_pointer_cast; +using std::string; #ifdef HAVE_LIBSIGROKCXX void LegacyInput::class_init(Gst::ElementClass *klass) diff --git a/src/legacy_output.cpp b/src/legacy_output.cpp index de8e5be..194d77c 100644 --- a/src/legacy_output.cpp +++ b/src/legacy_output.cpp @@ -31,7 +31,11 @@ namespace Srf { -using namespace std; +using std::cout; +using std::map; +using std::runtime_error; +using std::shared_ptr; +using std::string; #ifdef HAVE_LIBSIGROKCXX void LegacyOutput::class_init(Gst::ElementClass *klass)