[Libreoffice-commits] core.git: 3 commits - sal/osl sdext/source
Tor Lillqvist
tml at collabora.com
Thu May 12 06:22:17 UTC 2016
sal/osl/all/log.cxx | 12 ++++++------
sdext/source/presenter/PresenterButton.cxx | 2 +-
sdext/source/presenter/PresenterPaintManager.cxx | 2 +-
3 files changed, 8 insertions(+), 8 deletions(-)
New commits:
commit e1efe3359c5105f1347ab7527aeff109e62b7e3f
Author: Tor Lillqvist <tml at collabora.com>
Date: Thu May 12 08:46:22 2016 +0300
loplugin:stringconstant
Change-Id: I9eed9713a0d208e7aa4cdddc0cedb97edf831239
diff --git a/sdext/source/presenter/PresenterButton.cxx b/sdext/source/presenter/PresenterButton.cxx
index f0edc2f..de2d758 100644
--- a/sdext/source/presenter/PresenterButton.cxx
+++ b/sdext/source/presenter/PresenterButton.cxx
@@ -497,7 +497,7 @@ Reference<beans::XPropertySet> PresenterButton::GetConfigurationProperties (
[&rsConfgurationName](OUString const&, uno::Reference<beans::XPropertySet> const& xProps) -> bool
{
return PresenterConfigurationAccess::IsStringPropertyEqual(
- rsConfgurationName, OUString("Name"), xProps);
+ rsConfgurationName, "Name", xProps);
}),
UNO_QUERY);
}
commit f1fa4a58fc6e203b44031f3a344ec79c14ec2173
Author: Tor Lillqvist <tml at collabora.com>
Date: Thu May 12 08:44:34 2016 +0300
loplugin:defaultparams
Change-Id: I4905e4c1dd72dabe2229d99742ee0012295a9742
diff --git a/sdext/source/presenter/PresenterPaintManager.cxx b/sdext/source/presenter/PresenterPaintManager.cxx
index a5eb4a2..b7b55fb 100644
--- a/sdext/source/presenter/PresenterPaintManager.cxx
+++ b/sdext/source/presenter/PresenterPaintManager.cxx
@@ -45,7 +45,7 @@ PresenterPaintManager::PresenterPaintManager (
{
return [this, rxWindow] (css::awt::Rectangle const& rRepaintBox)
{
- return this->Invalidate(rxWindow, rRepaintBox, false/*bSynchronous*/);
+ return this->Invalidate(rxWindow, rRepaintBox /* , bSynchronous=false */);
};
}
commit 1275d9614724308b97724dacb7713f07fdb173d0
Author: Tor Lillqvist <tml at collabora.com>
Date: Thu May 12 08:39:58 2016 +0300
-Werror,-Wimplicit-fallthrough
Fix "fallthrough annotation in unreachable code". Clang is clever
enough to know that code after assert(false) is unreachable in a
non-NDEBUG build.
Seriously, micro-optimisation of the case that should never be
reached?
Change-Id: I10d7ae60895437be52c27aa93539d17e0f091ac4
diff --git a/sal/osl/all/log.cxx b/sal/osl/all/log.cxx
index d122bbc..9c75393 100644
--- a/sal/osl/all/log.cxx
+++ b/sal/osl/all/log.cxx
@@ -63,9 +63,6 @@ bool equalStrings(
#if !defined ANDROID
char const * toString(sal_detail_LogLevel level) {
switch (level) {
- default:
- assert(false); // this cannot happen
- SAL_FALLTHROUGH;
case SAL_DETAIL_LOG_LEVEL_INFO:
return "info";
case SAL_DETAIL_LOG_LEVEL_WARN:
@@ -73,6 +70,9 @@ char const * toString(sal_detail_LogLevel level) {
case SAL_DETAIL_LOG_LEVEL_DEBUG:
case SAL_DETAIL_LOG_LEVEL_DEBUG_TRACE:
return "debug";
+ default:
+ assert(false); // this cannot happen
+ return "broken";
}
}
#endif
@@ -244,9 +244,6 @@ void log(
case SAL_DETAIL_LOG_LEVEL_INFO:
prio = LOG_INFO;
break;
- default:
- assert(false); // this cannot happen
- SAL_FALLTHROUGH;
case SAL_DETAIL_LOG_LEVEL_WARN:
prio = LOG_WARNING;
break;
@@ -254,6 +251,9 @@ void log(
case SAL_DETAIL_LOG_LEVEL_DEBUG_TRACE:
prio = LOG_DEBUG;
break;
+ default:
+ assert(false); // this cannot happen
+ prio = LOG_WARNING;
}
syslog(prio, "%s", s.str().c_str());
#endif
More information about the Libreoffice-commits
mailing list