summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2020-05-15 12:57:32 +0000
committerAlbert Astals Cid <tsdgeos@yahoo.es>2020-05-19 21:06:58 +0000
commit437553ecb26948f77c3dbf7ad29bca86ffff7f6e (patch)
tree2336ae17f7c74c2408259dab60605a08f431b733
parent57de32198a4406eae18b80eed42e6050e2b48cca (diff)
[cpp] change page_private::init_font_info_cache() to a void method.
We already have a boolean font_info_cache_initialized, no need to guess the initialization result by the size of initialized cache.
-rw-r--r--cpp/poppler-page-private.h2
-rw-r--r--cpp/poppler-page.cpp6
2 files changed, 4 insertions, 4 deletions
diff --git a/cpp/poppler-page-private.h b/cpp/poppler-page-private.h
index d4954e9d..442f8bb1 100644
--- a/cpp/poppler-page-private.h
+++ b/cpp/poppler-page-private.h
@@ -50,7 +50,7 @@ public:
std::vector<font_info> font_info_cache;
bool font_info_cache_initialized;
- size_t init_font_info_cache();
+ void init_font_info_cache();
};
}
diff --git a/cpp/poppler-page.cpp b/cpp/poppler-page.cpp
index e44ef26e..f274ca5b 100644
--- a/cpp/poppler-page.cpp
+++ b/cpp/poppler-page.cpp
@@ -57,10 +57,10 @@ page_private::~page_private()
delete transition;
}
-size_t page_private::init_font_info_cache()
+void page_private::init_font_info_cache()
{
if (font_info_cache_initialized)
- return font_info_cache.size();
+ return;
poppler::font_iterator it(index, doc);
@@ -69,7 +69,7 @@ size_t page_private::init_font_info_cache()
}
font_info_cache_initialized = true;
- return font_info_cache.size();
+ return;
}
/**