mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-06-05 21:59:17 +02:00
Inplace strings - performance optimization
This commit is contained in:
@ -80,16 +80,30 @@ void PDFStatisticsCollector::visitReal(PDFReal value)
|
||||
collectStatisticsOfSimpleObject(PDFObject::Type::Real);
|
||||
}
|
||||
|
||||
void PDFStatisticsCollector::visitString(const PDFString* string)
|
||||
void PDFStatisticsCollector::visitString(PDFStringRef string)
|
||||
{
|
||||
Statistics& statistics = m_statistics[PDFObject::Type::String];
|
||||
collectStatisticsOfString(string, statistics);
|
||||
if (string.inplaceString)
|
||||
{
|
||||
collectStatisticsOfSimpleObject(PDFObject::Type::String);
|
||||
}
|
||||
else
|
||||
{
|
||||
collectStatisticsOfString(string.memoryString, statistics);
|
||||
}
|
||||
}
|
||||
|
||||
void PDFStatisticsCollector::visitName(const PDFString* name)
|
||||
void PDFStatisticsCollector::visitName(PDFStringRef name)
|
||||
{
|
||||
Statistics& statistics = m_statistics[PDFObject::Type::Name];
|
||||
collectStatisticsOfString(name, statistics);
|
||||
if (name.inplaceString)
|
||||
{
|
||||
collectStatisticsOfSimpleObject(PDFObject::Type::Name);
|
||||
}
|
||||
else
|
||||
{
|
||||
collectStatisticsOfString(name.memoryString, statistics);
|
||||
}
|
||||
}
|
||||
|
||||
void PDFStatisticsCollector::visitArray(const PDFArray* array)
|
||||
|
Reference in New Issue
Block a user