aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2016-10-30 11:59:36 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2016-10-30 11:59:36 +0100
commitd0d31db28c81559e0c4c0f93fafc9b6e762eb817 (patch)
tree6f559601859c3547d427a9f5017e7d5a19c74763
parentf21352094c0949b643721ee5387fefae0cdab507 (diff)
downloaddabmux-d0d31db28c81559e0c4c0f93fafc9b6e762eb817.tar.gz
dabmux-d0d31db28c81559e0c4c0f93fafc9b6e762eb817.tar.bz2
dabmux-d0d31db28c81559e0c4c0f93fafc9b6e762eb817.zip
Make DabInputBase::open take a reference
-rw-r--r--src/dabInput.h4
-rw-r--r--src/dabInputPrbs.cpp2
-rw-r--r--src/dabInputPrbs.h2
-rw-r--r--src/dabInputZmq.cpp2
-rw-r--r--src/dabInputZmq.h2
5 files changed, 6 insertions, 6 deletions
diff --git a/src/dabInput.h b/src/dabInput.h
index f1b4348..d5444cd 100644
--- a/src/dabInput.h
+++ b/src/dabInput.h
@@ -51,7 +51,7 @@ struct dabInputOperations {
/* New input object base */
class DabInputBase {
public:
- virtual int open(const std::string name) = 0;
+ virtual int open(const std::string& name) = 0;
virtual int readFrame(void* buffer, int size) = 0;
virtual int setBitrate(int bitrate) = 0;
virtual int close() = 0;
@@ -71,7 +71,7 @@ class DabInputCompatible : public DabInputBase {
virtual ~DabInputCompatible()
{ m_ops.clean(&args); }
- virtual int open(const std::string name)
+ virtual int open(const std::string& name)
{ return m_ops.open(args, name.c_str()); }
virtual int setbuf(int size)
diff --git a/src/dabInputPrbs.cpp b/src/dabInputPrbs.cpp
index f9a62b5..2678668 100644
--- a/src/dabInputPrbs.cpp
+++ b/src/dabInputPrbs.cpp
@@ -42,7 +42,7 @@ using namespace std;
// Preferred polynomial is G(x) = x^20 + x^17 + 1
const uint32_t PRBS_DEFAULT_POLY = (1 << 19) | (1 << 16) | 1;
-int DabInputPrbs::open(const string name)
+int DabInputPrbs::open(const string& name)
{
if (name.empty()) {
m_prbs.setup(PRBS_DEFAULT_POLY);
diff --git a/src/dabInputPrbs.h b/src/dabInputPrbs.h
index 9cde7e2..95c5e25 100644
--- a/src/dabInputPrbs.h
+++ b/src/dabInputPrbs.h
@@ -39,7 +39,7 @@
class DabInputPrbs : public DabInputBase {
public:
- virtual int open(const std::string name);
+ virtual int open(const std::string& name);
virtual int readFrame(void* buffer, int size);
virtual int setBitrate(int bitrate);
virtual int close();
diff --git a/src/dabInputZmq.cpp b/src/dabInputZmq.cpp
index 790a961..93f1ea3 100644
--- a/src/dabInputZmq.cpp
+++ b/src/dabInputZmq.cpp
@@ -223,7 +223,7 @@ void DabInputZmqBase::rebind()
}
}
-int DabInputZmqBase::open(const std::string inputUri)
+int DabInputZmqBase::open(const std::string& inputUri)
{
m_inputUri = inputUri;
diff --git a/src/dabInputZmq.h b/src/dabInputZmq.h
index fdd0f1b..351fb07 100644
--- a/src/dabInputZmq.h
+++ b/src/dabInputZmq.h
@@ -191,7 +191,7 @@ class DabInputZmqBase : public DabInputBase, public RemoteControllable {
INVALIDATE_KEY(m_curve_encoder_key);
}
- virtual int open(const std::string inputUri);
+ virtual int open(const std::string& inputUri);
virtual int readFrame(void* buffer, int size);
virtual int setBitrate(int bitrate);
virtual int close();