From 7d74f52e9d7212639427f0c69130e6c4a231a461 Mon Sep 17 00:00:00 2001 From: Fridrich Štrba Date: Mon, 22 Jul 2013 22:16:15 +0200 Subject: Cppcheck: (performance) Function parameter 'weights' should be passed by reference --- src/lib/VSDContentCollector.cpp | 2 +- src/lib/VSDContentCollector.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/VSDContentCollector.cpp b/src/lib/VSDContentCollector.cpp index da345bf..6063fe2 100644 --- a/src/lib/VSDContentCollector.cpp +++ b/src/lib/VSDContentCollector.cpp @@ -1521,7 +1521,7 @@ void libvisio::VSDContentCollector::_generatePolylineFromNURBS(unsigned degree, } } -bool libvisio::VSDContentCollector::_isUniform(const std::vector weights) const +bool libvisio::VSDContentCollector::_isUniform(const std::vector &weights) const { if (weights.empty()) return true; diff --git a/src/lib/VSDContentCollector.h b/src/lib/VSDContentCollector.h index b34e9d1..4889770 100644 --- a/src/lib/VSDContentCollector.h +++ b/src/lib/VSDContentCollector.h @@ -221,7 +221,7 @@ private: void _appendField(WPXString &text); // NURBS processing functions - bool _isUniform(const std::vector weights) const; + bool _isUniform(const std::vector &weights) const; void _generatePolylineFromNURBS(unsigned degree, const std::vector > &controlPoints, const std::vector &knotVector, const std::vector &weights); void _generateBezierSegmentsFromNURBS(unsigned degree, const std::vector > &controlPoints, -- cgit v1.2.3