diff options
author | Jan Holthuis <jan.holthuis@ruhr-uni-bochum.de> | 2020-11-17 20:02:14 +0100 |
---|---|---|
committer | Jan Holthuis <jan.holthuis@ruhr-uni-bochum.de> | 2020-11-19 19:46:54 +0100 |
commit | 4e1bebf0f5e06ecdd99c41771e7b4ee19c0cdcf3 (patch) | |
tree | d0e98cee9eef416282049092ea93b0b2b6eb417d /src/engine/channels/engineaux.cpp | |
parent | 133ea1e3d6547964f014144eee15590ea449c7af (diff) |
Pass non-trivial/large function args by reference
Fixes a bunch of `-Wclazy-function-args-by-ref` warnings. See
https://github.com/KDE/clazy/blob/master/docs/checks/README-function-args-by-ref.md
for details.
Most of these changes are automated, using the clazy fixit by setting
the `CLAZY_EXPORT_FIXES` before compilation and then running:
$ mkdir /tmp/patch
$ find ../src -iname "*.yaml" -exec mv {} /tmp/patch \;
$ clang-apply-replacements /tmp/patch
Diffstat (limited to 'src/engine/channels/engineaux.cpp')
-rw-r--r-- | src/engine/channels/engineaux.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/engine/channels/engineaux.cpp b/src/engine/channels/engineaux.cpp index eaaef154ae..9f75ec6d68 100644 --- a/src/engine/channels/engineaux.cpp +++ b/src/engine/channels/engineaux.cpp @@ -46,7 +46,7 @@ bool EngineAux::isActive() { return m_wasActive; } -void EngineAux::onInputConfigured(AudioInput input) { +void EngineAux::onInputConfigured(const AudioInput& input) { if (input.getType() != AudioPath::AUXILIARY) { // This is an error! qDebug() << "WARNING: EngineAux connected to AudioInput for a non-auxiliary type!"; @@ -56,7 +56,7 @@ void EngineAux::onInputConfigured(AudioInput input) { m_pInputConfigured->forceSet(1.0); } -void EngineAux::onInputUnconfigured(AudioInput input) { +void EngineAux::onInputUnconfigured(const AudioInput& input) { if (input.getType() != AudioPath::AUXILIARY) { // This is an error! qDebug() << "WARNING: EngineAux connected to AudioInput for a non-auxiliary type!"; @@ -66,8 +66,8 @@ void EngineAux::onInputUnconfigured(AudioInput input) { m_pInputConfigured->forceSet(0.0); } -void EngineAux::receiveBuffer(AudioInput input, const CSAMPLE* pBuffer, - unsigned int nFrames) { +void EngineAux::receiveBuffer( + const AudioInput& input, const CSAMPLE* pBuffer, unsigned int nFrames) { Q_UNUSED(input); Q_UNUSED(nFrames); m_sampleBuffer = pBuffer; |