From 6cf667cc94262b563869e851b01c3c49fe98c6c8 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sun, 3 Jan 2016 20:24:38 +0000 Subject: cppcheck: passedByValue Change-Id: Id8b2db3b824ea40345aba99a5f24f2579c0ad630 --- sw/inc/splargs.hxx | 4 +++- sw/source/core/edit/edlingu.cxx | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'sw') diff --git a/sw/inc/splargs.hxx b/sw/inc/splargs.hxx index 7010e6a54971..9b1457dc6b0e 100644 --- a/sw/inc/splargs.hxx +++ b/sw/inc/splargs.hxx @@ -155,8 +155,10 @@ public: namespace sw { +typedef std::function Creator; + SwTextFrame * -SwHyphIterCacheLastTextFrame(SwTextNode *, std::function); +SwHyphIterCacheLastTextFrame(SwTextNode *, const Creator& rCreator); } diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx index a92705eef782..6433dd8c114e 100644 --- a/sw/source/core/edit/edlingu.cxx +++ b/sw/source/core/edit/edlingu.cxx @@ -158,7 +158,7 @@ class SwHyphIter : public SwLinguIter // With that we save a GetFrame() in Hyphenate //TODO: does it actually matter? const SwTextNode *m_pLastNode; SwTextFrame *m_pLastFrame; - friend SwTextFrame * sw::SwHyphIterCacheLastTextFrame(SwTextNode *, std::function); + friend SwTextFrame * sw::SwHyphIterCacheLastTextFrame(SwTextNode* pNode, const sw::Creator& rCreator); bool bOldIdle; static void DelSoftHyph( SwPaM &rPam ); @@ -573,7 +573,7 @@ namespace sw { SwTextFrame * SwHyphIterCacheLastTextFrame(SwTextNode *const pNode, - std::function const create) + const sw::Creator& create) { assert(g_pHyphIter); if (pNode != g_pHyphIter->m_pLastNode || !g_pHyphIter->m_pLastFrame) -- cgit