On Tue, Jan 10, 2006 at 08:09:17PM -0300, Kayo Hamid wrote:
diff --git a/sw/source/core/access/acccell.cxx b/sw/source/core/access/acccell.cxx
index dbd1b51..2479c5c 100644
--- a/sw/source/core/access/acccell.cxx
+++ b/sw/source/core/access/acccell.cxx
@@ -121,7 +121,7 @@ SwAccessibleCell::SwAccessibleCell( SwAccessibleMap *pInitMap,
sal_Bool SwAccessibleCell::_InvalidateMyCursorPos()
{
sal_Bool bNew = IsSelected();
- sal_Bool bOld;
+ sal_Bool bOld = sal_False;
{
osl::MutexGuard aGuard( aMutex );
bOld = bIsSelected;
This is good, but not necessary, because bOld is always initialized later.
Anyway, if it has any impact on performance, it's negative, because
there must be at least one instruction more (to store the initialization
value into the variable).
@@ -349,7 +349,7 @@ sal_Bool SwAccessibleCell::setCurrentValue( const uno::Any& aNumber )
SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC( XAccessibleValue );
- double fValue = 0;
+ const double fValue = 0;
sal_Bool bValid = (aNumber >>= fValue);
if( bValid )
{
This is absolutely wrong, because fValue is changed just a line lower (by
=, which is uno::Any extraction operator).
diff --git a/sw/source/core/access/acccontext.cxx b/sw/source/core/access/acccontext.cxx
index 127820f..978dcad 100644
--- a/sw/source/core/access/acccontext.cxx
+++ b/sw/source/core/access/acccontext.cxx
@@ -507,7 +507,7 @@ void SwAccessibleContext::FireVisibleDataEvent()
}
void SwAccessibleContext::FireStateChangedEvent( sal_Int16 nState,
- sal_Bool bNewState )
+ const sal_Bool bNewState )
{
AccessibleEventObject aEvent;
This is good, but why not mark nState const as well? It is not changed
anywhere in the function... Anyway, there is absolutely _no_ performance
gain in it.
- void FireStateChangedEvent( sal_Int16 nState, sal_Bool bNewState );
+ void FireStateChangedEvent( sal_Int16 nState, const sal_Bool
bNewState );
This is superfluous, because these two signatures are equal (well, not
all compilers understand it correctly, e.g., the Sun C++ compiler).
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.