diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-07 08:42:54 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-07 10:45:05 +0200 |
commit | 868d8c8f0fdf376b0a3eb545ee841c9c12ffee3b (patch) | |
tree | 7e8b919732f3d73cfb77974c489ee864103b2882 /rsc | |
parent | 9479171a09ba4c73afa8b40a5c2590df3b6d5415 (diff) |
loplugin:unnecessaryparen handle parens inside call expr
stick to single-arg function calls, sometimes parens in multi-arg calls
might be there for clarity
Change-Id: Ib80190c571ce65b5d219a88056687042de749e74
Reviewed-on: https://gerrit.libreoffice.org/39676
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'rsc')
-rw-r--r-- | rsc/source/parser/rsckey.cxx | 3 | ||||
-rw-r--r-- | rsc/source/res/rscclass.cxx | 4 | ||||
-rw-r--r-- | rsc/source/res/rscconst.cxx | 2 |
3 files changed, 4 insertions, 5 deletions
diff --git a/rsc/source/parser/rsckey.cxx b/rsc/source/parser/rsckey.cxx index b4758fff6aaa..843470f793b8 100644 --- a/rsc/source/parser/rsckey.cxx +++ b/rsc/source/parser/rsckey.cxx @@ -72,8 +72,7 @@ Atom RscNameTable::Put( Atom nName, sal_uInt32 nTyp, sal_IntPtr nValue ) ((nEntries +1) * sizeof( KEY_STRUCT )) )); else pTable = static_cast<KEY_STRUCT *>( - rtl_allocateMemory( ((nEntries +1) - * sizeof( KEY_STRUCT )) )); + rtl_allocateMemory( (nEntries + 1) * sizeof( KEY_STRUCT ) ) ); pTable[ nEntries ].nName = nName; pTable[ nEntries ].nTyp = nTyp; diff --git a/rsc/source/res/rscclass.cxx b/rsc/source/res/rscclass.cxx index c793771d4322..386b34a2229a 100644 --- a/rsc/source/res/rscclass.cxx +++ b/rsc/source/res/rscclass.cxx @@ -220,8 +220,8 @@ ERRTYPE RscClass::SetVariable( Atom nVarName, } else { - pVarTypeList = static_cast<VARTYPE_STRUCT *>(rtl_allocateMemory( ((nEntries +1) - * sizeof( VARTYPE_STRUCT )) )); + pVarTypeList = static_cast<VARTYPE_STRUCT *>(rtl_allocateMemory( (nEntries + 1) + * sizeof( VARTYPE_STRUCT ) )); } pVarTypeList[ nEntries ].nVarName = nVarName; pVarTypeList[ nEntries ].nMask = nMask; diff --git a/rsc/source/res/rscconst.cxx b/rsc/source/res/rscconst.cxx index f791eb2b6b63..c0161106dbea 100644 --- a/rsc/source/res/rscconst.cxx +++ b/rsc/source/res/rscconst.cxx @@ -44,7 +44,7 @@ void RscEnum::SetConstant( Atom nVarName, sal_Int32 lValue ) pVarArray = static_cast<VarEle *>(rtl_reallocateMemory( static_cast<void *>(pVarArray), ((nEntries +1) * sizeof( VarEle )) )); else - pVarArray = static_cast<VarEle *>(rtl_allocateMemory( ((nEntries +1) * sizeof( VarEle )) )); + pVarArray = static_cast<VarEle *>(rtl_allocateMemory( (nEntries +1) * sizeof( VarEle ) )); pVarArray[ nEntries ].nId = nVarName; pVarArray[ nEntries ].lValue = lValue; nEntries++; |