[Libreoffice-commits] core.git: 3 commits - compilerplugins/clang sfx2/source starmath/source
LuboÅ¡ LuÅák
l.lunak at suse.cz
Tue Jul 16 06:42:12 PDT 2013
compilerplugins/clang/pointertobool.cxx | 7 ++++---
sfx2/source/dialog/versdlg.cxx | 1 +
starmath/source/mathtype.cxx | 2 +-
3 files changed, 6 insertions(+), 4 deletions(-)
New commits:
commit 6ef38bf1c04de2a0733e5bfd88c483416541d098
Author: LuboÅ¡ LuÅák <l.lunak at suse.cz>
Date: Tue Jul 16 15:39:23 2013 +0200
avoid unused warning in non-debug build
Change-Id: I209292603b69f51d354369d99cb58fe32bc65a8d
diff --git a/sfx2/source/dialog/versdlg.cxx b/sfx2/source/dialog/versdlg.cxx
index a021580..24fdc2b 100644
--- a/sfx2/source/dialog/versdlg.cxx
+++ b/sfx2/source/dialog/versdlg.cxx
@@ -498,6 +498,7 @@ SfxViewVersionDialog_Impl::SfxViewVersionDialog_Impl(Window *pParent, SfxVersion
IMPL_LINK(SfxViewVersionDialog_Impl, ButtonHdl, Button*, pButton)
{
assert(pButton == m_pOKButton);
+ (void)pButton;
m_rInfo.aComment = m_pEdit->GetText();
EndDialog(RET_OK);
return 0L;
commit 784a34bf20ecf2566fd4db9f81b3a6bf9d2b7033
Author: LuboÅ¡ LuÅák <l.lunak at suse.cz>
Date: Tue Jul 16 15:31:40 2013 +0200
fix problem caused by confusing immutability OUString semantics again
Change-Id: I9207ec3309b9970afd5c56718829836eead4592b
diff --git a/starmath/source/mathtype.cxx b/starmath/source/mathtype.cxx
index 9875684..94310db 100644
--- a/starmath/source/mathtype.cxx
+++ b/starmath/source/mathtype.cxx
@@ -2909,7 +2909,7 @@ int MathType::HandleChar(sal_Int32 &rTextStart,int &rSetSize,int nLevel,
OUString aStr;
TypeFaceToString(aStr,nOldTypeFace);
aStr += "\"";
- rRet.replaceAt(rTextStart,0,aStr);
+ rRet = rRet.replaceAt(rTextStart,0,aStr);
aStr = OUString();
TypeFaceToString(aStr,nTypeFace);
commit c17c8cc029dc6c104e16627646389d09eb1e6119
Author: LuboÅ¡ LuÅák <l.lunak at suse.cz>
Date: Tue Jul 16 15:30:04 2013 +0200
mention the explicit bool conversion from C++11 for pointer-to-bool check
Change-Id: I050019b30d2ec96bbd25916624f8cb88d72110e4
diff --git a/compilerplugins/clang/pointertobool.cxx b/compilerplugins/clang/pointertobool.cxx
index 6988c4f..238e018 100644
--- a/compilerplugins/clang/pointertobool.cxx
+++ b/compilerplugins/clang/pointertobool.cxx
@@ -26,9 +26,10 @@ and potentially mistakes.
So far the only places that are checked are passing arguments to functions, as those
could easily choose a different overload.
-The original idea was that the only conversions that are considered safe are
-in conditions (which in turn means also in ||, && and ! operators) and places
-where it's considered unlikely for it to be a problem (or rather, less of a problem
+The original idea was that to follow the explicit bool feature from C++11, where
+the only conversions that would be considered safe are in conditions (which
+in turn means also in ||, && and ! operators) and places where it's considered
+unlikely for it to be a problem (or rather, less of a problem
than explicitly avoiding the warning in the code). The code for this is currently
commented out (there are a couple of places such as 'bool foo = returns_pointer();'
that would need modification), possibly enable those later.
More information about the Libreoffice-commits
mailing list