diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-01-21 09:10:29 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-01-21 09:10:30 +0100 |
commit | 8e0c4694f89dd66314faf5cfd411f58f2f8e1bca (patch) | |
tree | 673a930c1c70741718f618c723cfdce3fe3ca02c /desktop/source | |
parent | 77c677a41d4bc9a2cd71ea1cc17e6c836387a6c5 (diff) |
Clean up lok::Office::freeError()
- let it take a non-const pointer, just like free() or g_free() does
- remove lok::Document::freeError(), which was declared, but not
implemented
- move the declaration at the end of the stable API, but before the
unstable section
Change-Id: I5a8ced61fc87641dc2fa0ea3615a350361fae3a1
Diffstat (limited to 'desktop/source')
-rw-r--r-- | desktop/source/lib/init.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 6b8f36984dc1..f2f90346a737 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -430,7 +430,7 @@ static void lo_destroy (LibreOfficeKit* pThis); static int lo_initialize (LibreOfficeKit* pThis, const char* pInstallPath, const char* pUserProfilePath); static LibreOfficeKitDocument* lo_documentLoad (LibreOfficeKit* pThis, const char* pURL); static char * lo_getError (LibreOfficeKit* pThis); -static void lo_freeError (const char *pfree); +static void lo_freeError (char* pFree); static LibreOfficeKitDocument* lo_documentLoadWithOptions (LibreOfficeKit* pThis, const char* pURL, const char* pOptions); @@ -1574,9 +1574,10 @@ static char* lo_getError (LibreOfficeKit *pThis) strcpy(pMemory, aString.getStr()); return pMemory; } -static void lo_freeError(const char *pfree) + +static void lo_freeError(char* pFree) { - free(const_cast<char *>(pfree)); + free(pFree); } static char* lo_getFilterTypes(LibreOfficeKit* pThis) |