diff options
Diffstat (limited to 'libqpdf/QPDFFormFieldObjectHelper.cc')
-rw-r--r-- | libqpdf/QPDFFormFieldObjectHelper.cc | 30 |
1 files changed, 9 insertions, 21 deletions
diff --git a/libqpdf/QPDFFormFieldObjectHelper.cc b/libqpdf/QPDFFormFieldObjectHelper.cc index 67975451..4f7ca0e1 100644 --- a/libqpdf/QPDFFormFieldObjectHelper.cc +++ b/libqpdf/QPDFFormFieldObjectHelper.cc @@ -481,8 +481,8 @@ namespace std::vector<std::string> opt; double tf; QPDFObjectHandle::Rectangle bbox; - enum { st_top, st_bmc, st_emc, st_end } state; - bool replaced; + enum { st_top, st_bmc, st_emc, st_end } state{st_top}; + bool replaced{false}; }; } // namespace @@ -496,9 +496,7 @@ ValueSetter::ValueSetter( V(V), opt(opt), tf(tf), - bbox(bbox), - state(st_top), - replaced(false) + bbox(bbox) { } @@ -649,34 +647,24 @@ namespace class TfFinder: public QPDFObjectHandle::TokenFilter { public: - TfFinder(); - ~TfFinder() override - { - } + TfFinder() = default; + ~TfFinder() override = default; void handleToken(QPDFTokenizer::Token const&) override; double getTf(); std::string getFontName(); std::string getDA(); private: - double tf; - int tf_idx; + double tf{11.0}; + int tf_idx{-1}; std::string font_name; - double last_num; - int last_num_idx; + double last_num{0.0}; + int last_num_idx{-1}; std::string last_name; std::vector<std::string> DA; }; } // namespace -TfFinder::TfFinder() : - tf(11.0), - tf_idx(-1), - last_num(0.0), - last_num_idx(-1) -{ -} - void TfFinder::handleToken(QPDFTokenizer::Token const& token) { |