diff options
author | Michael Stahl <mstahl@redhat.com> | 2015-07-07 15:07:59 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-07-08 15:02:03 +0000 |
commit | 394c5057e2c2a10bc09504646eed1b80e3cb061c (patch) | |
tree | daacb3e6cccec63805431de2ebd7c1abbccff03b /sw | |
parent | 61b1697069c50ff72339d4592add42ab72b03243 (diff) |
sw: let's try some C++11 syntax for function pointers
Less ugly or just differently ugly? Hard to tell...
Change-Id: I1265f07f39ebbc65acfcc30242bc7cd7d46207e7
Reviewed-on: https://gerrit.libreoffice.org/16821
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/pam.hxx | 4 |
1 files changed, 3 insertions, 1 deletions
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; |