From 394c5057e2c2a10bc09504646eed1b80e3cb061c Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 7 Jul 2015 15:07:59 +0200 Subject: sw: let's try some C++11 syntax for function pointers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Less ugly or just differently ugly? Hard to tell... Change-Id: I1265f07f39ebbc65acfcc30242bc7cd7d46207e7 Reviewed-on: https://gerrit.libreoffice.org/16821 Tested-by: Jenkins Reviewed-by: Björn Michaelsen Reviewed-by: Michael Stahl --- sw/inc/pam.hxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sw') diff --git a/sw/inc/pam.hxx b/sw/inc/pam.hxx index 40715b48fee1..cce42c00c7ee 100644 --- a/sw/inc/pam.hxx +++ b/sw/inc/pam.hxx @@ -143,7 +143,9 @@ typedef SwMoveFnCollection* SwMoveFn; SW_DLLPUBLIC extern SwMoveFn fnMoveForward; ///< SwPam::Move()/Find() default argument. SW_DLLPUBLIC extern SwMoveFn fnMoveBackward; -typedef bool (*SwGoInDoc)( SwPaM& rPam, SwMoveFn fnMove ); +// also works: using SwGoInDoc = bool (*) (SwPaM& rPam, SwMoveFn fnMove); +// no works: using SwGoInDoc = [](SwPaM& rPam, SwMoveFn fnMove) -> bool; +using SwGoInDoc = auto (*)(SwPaM& rPam, SwMoveFn fnMove) -> bool; SW_DLLPUBLIC extern SwGoInDoc fnGoDoc; extern SwGoInDoc fnGoSection; SW_DLLPUBLIC extern SwGoInDoc fnGoNode; -- cgit v1.2.3