Download it now!
Bug 91054 - cleanup weirdo function prototypes ...
Summary: cleanup weirdo function prototypes ...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
Version:
(earliest affected)
4.4.3.2 release
Hardware: Other All
: medium normal
Assignee: Jens Carl
URL:
Whiteboard: ToBeReviewed
Keywords: difficultyBeginner, easyHack, skillCpp, topicCleanup
Depends on:
Blocks:
 
Reported: 2015-05-03 18:10 UTC by Michael Meeks
Modified: 2017-02-14 08:57 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Meeks 2015-05-03 18:10:15 UTC
If you poke at (at least) chart2/source/tools/LifeTime.cxx you can see the most amazing function signatures like this:

        bool CloseableLifeTimeManager
::g_close_startTryClose(bool bDeliverOwnership)
    throw ( uno::Exception )
{

There is no real consensus on the 'right' way to do function prototypes, so don't go wild changing everything; but the above looks really wrong & unusual to me =) it'd be good to find instances of this particular oddness & change them to (perhaps)

bool CloseableLifeTimeManager::g_close_startTryClose(bool bDeliverOwnership)
    throw ( uno::Exception )

which at least looks like a method ;-)

Thanks !
Comment 1 Jens Carl 2015-05-14 16:19:19 UTC
To identify these lines I wrote:

 git grep -n -E -e '^::[a-zA-Z0-9_]*\(' -- '*.cxx'

(It's pretty basic since git-grep doesn't support multiline patterns and finding function prototype with pattern is pretty hard.)

I found like 25 lines with that and will change them according to your example.
Comment 2 Commit Notification 2015-05-21 06:35:26 UTC
Jens Carl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=5bf6fecde772d1fb35645fe217e6fe3b5b5ac918

tdf#91054: cleanup weirdo function prototypes

It will be available in 5.0.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 3 kerem 2015-10-12 17:36:43 UTC
I sent following patch for this bug;

https://gerrit.libreoffice.org/#/c/19328/
Comment 4 Commit Notification 2015-10-13 09:54:59 UTC
kerem committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=98528be2fe1160d45f62222193da482f5bb06d00

tdf#91054 cleanup weirdo function prototypes

It will be available in 5.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Robinson Tryon (qubit) 2015-12-14 06:36:11 UTC Comment hidden (obsolete)
Comment 6 iremsendur 2016-02-02 07:42:18 UTC
I sent following patch for this bug :

https://gerrit.libreoffice.org/#/c/21990/
Comment 7 Commit Notification 2016-02-02 14:15:47 UTC
irem committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=e1cd15fbac8727627c06e7a1e7c00691c66b0a11

tdf#91054 cleanup weirdo function prototypes

It will be available in 5.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Robinson Tryon (qubit) 2016-02-18 14:51:33 UTC Comment hidden (obsolete)
Comment 9 jani 2016-04-18 07:36:51 UTC
If there are other places, we need a new code pointer.