aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2020-04-03 17:59:29 +0200
committerJay Berkenbilt <ejb@ql.org>2020-04-03 18:17:57 +0200
commit97de12343b908d937f4bb0562cd739896ce66d34 (patch)
tree4d1b76bc416c0064cceac86cad29addd0e99e1a2
parentcc755e37f7b559038e2d23acb6359814fb998286 (diff)
downloadqpdf-97de12343b908d937f4bb0562cd739896ce66d34.tar.zst
Performance: remove Members indirection for Pipeline
-rw-r--r--include/qpdf/Pipeline.hh22
-rw-r--r--libqpdf/Pipeline.cc15
2 files changed, 6 insertions, 31 deletions
diff --git a/include/qpdf/Pipeline.hh b/include/qpdf/Pipeline.hh
index 325aa680..6cb6e969 100644
--- a/include/qpdf/Pipeline.hh
+++ b/include/qpdf/Pipeline.hh
@@ -78,26 +78,10 @@ class QPDF_DLL_CLASS Pipeline
std::string identifier;
private:
- // Do not implement copy or assign
- Pipeline(Pipeline const&);
- Pipeline& operator=(Pipeline const&);
+ Pipeline(Pipeline const&) = delete;
+ Pipeline& operator=(Pipeline const&) = delete;
- class Members
- {
- friend class Pipeline;
-
- public:
- QPDF_DLL
- ~Members();
-
- private:
- Members(Pipeline* next);
- Members(Members const&);
-
- Pipeline* next;
- };
-
- PointerHolder<Members> m;
+ Pipeline* next;
};
#endif // PIPELINE_HH
diff --git a/libqpdf/Pipeline.cc b/libqpdf/Pipeline.cc
index bd4fb087..7939eb6d 100644
--- a/libqpdf/Pipeline.cc
+++ b/libqpdf/Pipeline.cc
@@ -1,18 +1,9 @@
#include <qpdf/Pipeline.hh>
#include <stdexcept>
-Pipeline::Members::Members(Pipeline* next) :
- next(next)
-{
-}
-
-Pipeline::Members::~Members()
-{
-}
-
Pipeline::Pipeline(char const* identifier, Pipeline* next) :
identifier(identifier),
- m(new Members(next))
+ next(next)
{
}
@@ -23,13 +14,13 @@ Pipeline::~Pipeline()
Pipeline*
Pipeline::getNext(bool allow_null)
{
- if ((this->m->next == 0) && (! allow_null))
+ if ((this->next == 0) && (! allow_null))
{
throw std::logic_error(
this->identifier +
": Pipeline::getNext() called on pipeline with no next");
}
- return this->m->next;
+ return this->next;
}
std::string