fix build with recent changes/gcc 6.3.0
[AROS-Contrib.git] / arospdf / splash / SplashFontFile.cc
blobacbc12a3b4f4a6a5d188da602d3b6986116a64d7
1 //========================================================================
2 //
3 // SplashFontFile.cc
4 //
5 //========================================================================
7 #include <aconf.h>
9 #ifdef USE_GCC_PRAGMAS
10 #pragma implementation
11 #endif
13 #include <stdio.h>
14 #ifndef WIN32
15 # include <unistd.h>
16 #endif
17 #include "GString.h"
18 #include "SplashFontFile.h"
19 #include "SplashFontFileID.h"
21 #ifdef VMS
22 #if (__VMS_VER < 70000000)
23 extern "C" int unlink(char *filename);
24 #endif
25 #endif
27 //------------------------------------------------------------------------
28 // SplashFontFile
29 //------------------------------------------------------------------------
31 SplashFontFile::SplashFontFile(SplashFontFileID *idA, char *fileNameA,
32 GBool deleteFileA) {
33 id = idA;
34 fileName = new GString(fileNameA);
35 deleteFile = deleteFileA;
36 refCnt = 0;
39 SplashFontFile::~SplashFontFile() {
40 if (deleteFile) {
41 unlink(fileName->getCString());
43 delete fileName;
44 delete id;
47 void SplashFontFile::incRefCnt() {
48 ++refCnt;
51 void SplashFontFile::decRefCnt() {
52 if (!--refCnt) {
53 delete this;