From b14c0530eb2c7c81d007201084d748034ad2a8fc Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Mon, 14 Sep 2015 21:12:16 +0200 Subject: [PATCH] Assorted cppcheck fixes Remove member disp_ that is defined both in Cursor and CursorData classes Pass parameter of convert(docstring const) templates as const reference for performance. --- src/Cursor.h | 2 -- src/support/convert.h | 10 +++++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/Cursor.h b/src/Cursor.h index 25771d3783..1cd51c2d11 100644 --- a/src/Cursor.h +++ b/src/Cursor.h @@ -95,8 +95,6 @@ public: protected: /// the anchor position DocIterator anchor_; - /// - mutable DispatchResult disp_; /// do we have a selection? bool selection_; /// are we on the way to get one? diff --git a/src/support/convert.h b/src/support/convert.h index c1cd31551a..e72fe61b56 100644 --- a/src/support/convert.h +++ b/src/support/convert.h @@ -37,11 +37,11 @@ template<> std::string convert(long l); template<> docstring convert(long l); template<> std::string convert(float f); template<> std::string convert(double d); -template<> int convert(std::string const s); -template<> int convert(docstring const s); -template<> unsigned int convert(std::string const s); -template<> unsigned long convert(std::string const s); -template<> double convert(std::string const s); +template<> int convert(std::string const & s); +template<> int convert(docstring const & s); +template<> unsigned int convert(std::string const & s); +template<> unsigned long convert(std::string const & s); +template<> double convert(std::string const & s); template<> int convert(char const * cptr); template<> double convert(char const * cptr);