[Libreoffice-commits] core.git: include/vcl vcl/source
Stephan Bergmann
sbergman at redhat.com
Thu Jan 23 04:41:09 PST 2014
include/vcl/font.hxx | 4 ++--
vcl/source/gdi/font.cxx | 10 ++--------
2 files changed, 4 insertions(+), 10 deletions(-)
New commits:
commit 7abe546e8105dff10536b7496ec46f911d6b9882
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Jan 23 13:40:30 2014 +0100
bool improvements
Change-Id: I3a3a2122902e1731e95d8469dfe9efc5a6b567ee
diff --git a/include/vcl/font.hxx b/include/vcl/font.hxx
index b597c11..8a2fb76 100644
--- a/include/vcl/font.hxx
+++ b/include/vcl/font.hxx
@@ -126,8 +126,8 @@ public:
void GetFontAttributes( ImplFontAttributes& rAttrs ) const;
Font& operator=( const Font& );
- sal_Bool operator==( const Font& ) const;
- sal_Bool operator!=( const Font& rFont ) const
+ bool operator==( const Font& ) const;
+ bool operator!=( const Font& rFont ) const
{ return !(Font::operator==( rFont )); }
sal_Bool IsSameInstance( const Font& ) const;
diff --git a/vcl/source/gdi/font.cxx b/vcl/source/gdi/font.cxx
index 70febab..2da4418 100644
--- a/vcl/source/gdi/font.cxx
+++ b/vcl/source/gdi/font.cxx
@@ -587,15 +587,9 @@ Font& Font::operator=( const Font& rFont )
return *this;
}
-sal_Bool Font::operator==( const Font& rFont ) const
+bool Font::operator==( const Font& rFont ) const
{
-
- if( mpImplFont == rFont.mpImplFont )
- return sal_True;
- if( *mpImplFont == *rFont.mpImplFont )
- return sal_True;
-
- return sal_False;
+ return mpImplFont == rFont.mpImplFont || *mpImplFont == *rFont.mpImplFont;
}
void Font::Merge( const Font& rFont )
More information about the Libreoffice-commits
mailing list