Kaydet (Commit) 57248316 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Fix compilation error for 64-bit OS X by simplifying code

The ifdef for __LP64__ is not needed as far as I can see.

Fixes error: cannot initialize a parameter of type 'const sal_GlyphId
*' (aka 'const unsigned int *') with an lvalue of type 'long *'.

Change-Id: I89d3ba29a5cfd1a89141ec86c873eaf384cf446e
üst 454b3020
...@@ -173,16 +173,8 @@ sal_Bool AquaSalGraphics::CreateFontSubset( const OUString& rToFile, ...@@ -173,16 +173,8 @@ sal_Bool AquaSalGraphics::CreateFontSubset( const OUString& rToFile,
// make the subsetter provide the requested subset // make the subsetter provide the requested subset
FILE* pOutFile = fopen( aToFile.getStr(), "wb" ); FILE* pOutFile = fopen( aToFile.getStr(), "wb" );
#ifdef __LP64__
long *pLongGlyphIDs = (long*)alloca(nGlyphCount * sizeof(long));
for (int i = 0; i < nGlyphCount; i++)
pLongGlyphIDs[i] = pGlyphIds[i];
bool bRC = rInfo.CreateFontSubset( FontSubsetInfo::TYPE1_PFB, pOutFile, NULL,
pLongGlyphIDs, pEncoding, nGlyphCount, pGlyphWidths );
#else
bool bRC = rInfo.CreateFontSubset( FontSubsetInfo::TYPE1_PFB, pOutFile, NULL, bool bRC = rInfo.CreateFontSubset( FontSubsetInfo::TYPE1_PFB, pOutFile, NULL,
pGlyphIds, pEncoding, nGlyphCount, pGlyphWidths ); pGlyphIds, pEncoding, nGlyphCount, pGlyphWidths );
#endif
fclose( pOutFile ); fclose( pOutFile );
return bRC; return bRC;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment