summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-11-27 17:57:50 +0100
committerDavid Robillard <d@drobilla.net>2020-11-27 21:42:51 +0100
commitd678d110b60aba04cfa46b3dff5e4aa44ce1c2e9 (patch)
tree2c58a110f841e666e3955a074c72e0f3541520bc
parent5cdc8bd8da6b7a6b1990ed2d7be483e19f9d7837 (diff)
downloadpatchage-d678d110b60aba04cfa46b3dff5e4aa44ce1c2e9.tar.gz
patchage-d678d110b60aba04cfa46b3dff5e4aa44ce1c2e9.tar.bz2
patchage-d678d110b60aba04cfa46b3dff5e4aa44ce1c2e9.zip
Avoid unnecessary copies
-rw-r--r--.clang-tidy1
-rw-r--r--src/JackDriver.cpp4
-rw-r--r--src/JackDriver.hpp2
-rw-r--r--src/Widget.hpp4
4 files changed, 6 insertions, 5 deletions
diff --git a/.clang-tidy b/.clang-tidy
index 03effaf..fedd900 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -43,7 +43,6 @@ Checks: >
-llvmlibc-*,
-misc-unused-parameters,
-modernize-use-trailing-return-type,
- -performance-unnecessary-value-param,
-readability-convert-member-functions-to-static,
-readability-implicit-bool-conversion,
-readability-inconsistent-declaration-parameter-name,
diff --git a/src/JackDriver.cpp b/src/JackDriver.cpp
index 648640f..48f3b9c 100644
--- a/src/JackDriver.cpp
+++ b/src/JackDriver.cpp
@@ -203,7 +203,9 @@ get_property(jack_uuid_t subject, const char* key)
#endif
PatchagePort*
-JackDriver::create_port(PatchageModule& parent, jack_port_t* port, PortID id)
+JackDriver::create_port(PatchageModule& parent,
+ jack_port_t* port,
+ const PortID& id)
{
if (!port) {
return nullptr;
diff --git a/src/JackDriver.hpp b/src/JackDriver.hpp
index 6a404a7..75f189c 100644
--- a/src/JackDriver.hpp
+++ b/src/JackDriver.hpp
@@ -77,7 +77,7 @@ public:
private:
PatchagePort*
- create_port(PatchageModule& parent, jack_port_t* port, PortID id);
+ create_port(PatchageModule& parent, jack_port_t* port, const PortID& id);
void shutdown();
diff --git a/src/Widget.hpp b/src/Widget.hpp
index 03c5f8e..f1db218 100644
--- a/src/Widget.hpp
+++ b/src/Widget.hpp
@@ -1,5 +1,5 @@
/* This file is part of Patchage
- * Copyright 2007-2014 David Robillard <http://drobilla.net>
+ * Copyright 2007-2020 David Robillard <d@drobilla.net>
*
* Patchage is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free
@@ -25,7 +25,7 @@ template<typename W>
class Widget
{
public:
- Widget(Glib::RefPtr<Gtk::Builder> xml, const std::string& name)
+ Widget(const Glib::RefPtr<Gtk::Builder>& xml, const std::string& name)
{
xml->get_widget(name, _me);
}