summaryrefslogtreecommitdiff
path: root/vcl/generic
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-01-17 17:02:58 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-01-17 18:45:14 +0100
commit5169abbac92f30b950ab19c2c8e285c47fb1f0d7 (patch)
tree12dc79b6a99b1978982f816037a9c1bad23032f0 /vcl/generic
parent3e5ff1f8d4da3470fa4016264c9410834a9736d8 (diff)
bool improvements
Change-Id: I7ec4f5b2e691ec03e9e2c5ca3a004f1e04efbc27
Diffstat (limited to 'vcl/generic')
-rw-r--r--vcl/generic/fontmanager/fontconfig.cxx10
-rw-r--r--vcl/generic/glyphs/glyphcache.cxx2
2 files changed, 6 insertions, 6 deletions
diff --git a/vcl/generic/fontmanager/fontconfig.cxx b/vcl/generic/fontmanager/fontconfig.cxx
index 0069f5f3f34d..d6bc5565b8cc 100644
--- a/vcl/generic/fontmanager/fontconfig.cxx
+++ b/vcl/generic/fontmanager/fontconfig.cxx
@@ -134,13 +134,13 @@ namespace
{
FcChar8 *pNameA=NULL, *pNameB=NULL;
- int nHaveA = FcPatternGetString(a, FC_FAMILY, 0, &pNameA) == FcResultMatch;
- int nHaveB = FcPatternGetString(b, FC_FAMILY, 0, &pNameB) == FcResultMatch;
+ bool nHaveA = FcPatternGetString(a, FC_FAMILY, 0, &pNameA) == FcResultMatch;
+ bool nHaveB = FcPatternGetString(b, FC_FAMILY, 0, &pNameB) == FcResultMatch;
if (nHaveA && nHaveB)
return strcmp((const char*)pNameA, (const char*)pNameB);
- return nHaveA - nHaveB;
+ return int(nHaveA) - int(nHaveB);
}
//Sort fonts so that fonts with the same family name are side-by-side, with
@@ -156,8 +156,8 @@ namespace
int nVersionA=0, nVersionB=0;
- int nHaveA = FcPatternGetInteger(a, FC_FONTVERSION, 0, &nVersionA) == FcResultMatch;
- int nHaveB = FcPatternGetInteger(b, FC_FONTVERSION, 0, &nVersionB) == FcResultMatch;
+ bool nHaveA = FcPatternGetInteger(a, FC_FONTVERSION, 0, &nVersionA) == FcResultMatch;
+ bool nHaveB = FcPatternGetInteger(b, FC_FONTVERSION, 0, &nVersionB) == FcResultMatch;
if (nHaveA && nHaveB)
return nVersionA > nVersionB;
diff --git a/vcl/generic/glyphs/glyphcache.cxx b/vcl/generic/glyphs/glyphcache.cxx
index 4ac5d82a1b9b..4e5e939e4bb9 100644
--- a/vcl/generic/glyphs/glyphcache.cxx
+++ b/vcl/generic/glyphs/glyphcache.cxx
@@ -89,7 +89,7 @@ size_t GlyphCache::IFSD_Hash::operator()( const FontSelectPattern& rFontSelData
size_t nHash = nFontId << 8;
nHash += rFontSelData.mnHeight;
nHash += rFontSelData.mnOrientation;
- nHash += rFontSelData.mbVertical;
+ nHash += size_t(rFontSelData.mbVertical);
nHash += rFontSelData.GetSlant();
nHash += rFontSelData.GetWeight();
#if ENABLE_GRAPHITE