From c394363c84064c041391627602665ea1fa74db60 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sun, 30 Jul 2017 12:15:18 +0200 Subject: loplugin:constparams in basctl Change-Id: If6c2b980a2916c4ee8ac108fbb84b006a35f49c5 Reviewed-on: https://gerrit.libreoffice.org/40570 Tested-by: Jenkins Reviewed-by: Noel Grandin --- pyuno/source/module/pyuno.cxx | 18 +++++++++--------- pyuno/source/module/pyuno_impl.hxx | 6 +++--- pyuno/source/module/pyuno_util.cxx | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) (limited to 'pyuno') diff --git a/pyuno/source/module/pyuno.cxx b/pyuno/source/module/pyuno.cxx index 044eec321fbb..92c58be45930 100644 --- a/pyuno/source/module/pyuno.cxx +++ b/pyuno/source/module/pyuno.cxx @@ -501,7 +501,7 @@ PyObject* PyUNO_dir (PyObject* self) return member_list; } -sal_Int32 lcl_detach_getLength( PyUNO *me ) +sal_Int32 lcl_detach_getLength( PyUNO const *me ) { PyThreadDetach antiguard; @@ -568,7 +568,7 @@ Py_ssize_t PyUNO_len( PyObject* self ) return -1; } -void lcl_getRowsColumns( PyUNO* me, sal_Int32& nRows, sal_Int32& nColumns ) +void lcl_getRowsColumns( PyUNO const * me, sal_Int32& nRows, sal_Int32& nColumns ) { Sequence aOutParamIndex; Sequence aOutParam; @@ -596,7 +596,7 @@ PyRef lcl_indexToSlice( const PyRef& rIndex ) return rSlice; } -PyObject* lcl_getitem_XCellRange( PyUNO* me, PyObject* pKey ) +PyObject* lcl_getitem_XCellRange( PyUNO const * me, PyObject* pKey ) { Runtime runtime; @@ -717,7 +717,7 @@ PyObject* lcl_getitem_XCellRange( PyUNO* me, PyObject* pKey ) return nullptr; } -PyObject* lcl_getitem_index( PyUNO *me, PyObject *pKey, Runtime& runtime ) +PyObject* lcl_getitem_index( PyUNO const *me, PyObject *pKey, Runtime const & runtime ) { Any aRet; sal_Int32 nIndex; @@ -746,7 +746,7 @@ PyObject* lcl_getitem_index( PyUNO *me, PyObject *pKey, Runtime& runtime ) return nullptr; } -PyObject* lcl_getitem_slice( PyUNO *me, PyObject *pKey ) +PyObject* lcl_getitem_slice( PyUNO const *me, PyObject *pKey ) { Runtime runtime; @@ -789,7 +789,7 @@ PyObject* lcl_getitem_slice( PyUNO *me, PyObject *pKey ) return nullptr; } -PyObject* lcl_getitem_string( PyUNO *me, PyObject *pKey, Runtime& runtime ) +PyObject* lcl_getitem_string( PyUNO const *me, PyObject *pKey, Runtime const & runtime ) { OUString sKey = pyString2ustring( pKey ); Any aRet; @@ -899,7 +899,7 @@ PyObject* PyUNO_getitem( PyObject *self, PyObject *pKey ) return nullptr; } -int lcl_setitem_index( PyUNO *me, PyObject *pKey, PyObject *pValue ) +int lcl_setitem_index( PyUNO const *me, PyObject *pKey, PyObject *pValue ) { Runtime runtime; @@ -967,7 +967,7 @@ int lcl_setitem_index( PyUNO *me, PyObject *pKey, PyObject *pValue ) return 1; } -int lcl_setitem_slice( PyUNO *me, PyObject *pKey, PyObject *pValue ) +int lcl_setitem_slice( PyUNO const *me, PyObject *pKey, PyObject *pValue ) { // XIndexContainer insert/remove/replace by slice Runtime runtime; @@ -1085,7 +1085,7 @@ int lcl_setitem_slice( PyUNO *me, PyObject *pKey, PyObject *pValue ) return 1; } -int lcl_setitem_string( PyUNO *me, PyObject *pKey, PyObject *pValue ) +int lcl_setitem_string( PyUNO const *me, PyObject *pKey, PyObject *pValue ) { Runtime runtime; diff --git a/pyuno/source/module/pyuno_impl.hxx b/pyuno/source/module/pyuno_impl.hxx index 3f87ad7a9309..d3f7a6a5c628 100644 --- a/pyuno/source/module/pyuno_impl.hxx +++ b/pyuno/source/module/pyuno_impl.hxx @@ -85,14 +85,14 @@ inline char * PyStr_AsString(PyObject *object) return PyUnicode_AsUTF8(object); } -inline bool PyStr_Check(PyObject *object) +inline bool PyStr_Check(PyObject const *object) { return PyUnicode_Check(object); } // compatibility wrappers for Python non-Unicode string/buffer type // (PyBytes in 3, PyString in 2) -inline bool PyStrBytes_Check(PyObject *object) +inline bool PyStrBytes_Check(PyObject const *object) { return PyBytes_Check(object); } @@ -162,7 +162,7 @@ static const sal_Int32 CALL = 1; static const sal_Int32 ARGS = 2; } -bool isLog( RuntimeCargo *cargo, sal_Int32 loglevel ); +bool isLog( RuntimeCargo const *cargo, sal_Int32 loglevel ); void log( RuntimeCargo *cargo, sal_Int32 level, const OUString &logString ); void log( RuntimeCargo *cargo, sal_Int32 level, const char *str ); void logCall( RuntimeCargo *cargo, const char *intro, diff --git a/pyuno/source/module/pyuno_util.cxx b/pyuno/source/module/pyuno_util.cxx index aecca4ad2eae..e92dad2e8bca 100644 --- a/pyuno/source/module/pyuno_util.cxx +++ b/pyuno/source/module/pyuno_util.cxx @@ -104,7 +104,7 @@ PyRef getObjectFromUnoModule( const Runtime &runtime, const char * func ) // Logging -bool isLog( RuntimeCargo * cargo, sal_Int32 loglevel ) +bool isLog( RuntimeCargo const * cargo, sal_Int32 loglevel ) { return cargo && cargo->logFile && loglevel <= cargo->logLevel; } -- cgit