hwpfilter/source/hpara.cxx | 1 - hwpfilter/source/hpara.h | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-)
New commits: commit b2d73530b60e34c5b70bdeed34a6246ae8f8bdf6 Author: Caolán McNamara <[email protected]> Date: Mon Jan 29 12:28:46 2018 +0000 ofz#5810 the vector has an entry for each char but most of it is empty, so use a map instead Change-Id: I92fe46939e5107926fd4b92167bbace63f0376d5 Reviewed-on: https://gerrit.libreoffice.org/48830 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/hwpfilter/source/hpara.cxx b/hwpfilter/source/hpara.cxx index deda63421b60..ebade2180463 100644 --- a/hwpfilter/source/hpara.cxx +++ b/hwpfilter/source/hpara.cxx @@ -162,7 +162,6 @@ bool HWPPara::Read(HWPFile & hwpf, unsigned char flag) } } // read string - hhstr.resize(nch); ii = 0; while (ii < nch) { diff --git a/hwpfilter/source/hpara.h b/hwpfilter/source/hpara.h index 06ba6e3a5ecc..d181aa21f94b 100644 --- a/hwpfilter/source/hpara.h +++ b/hwpfilter/source/hpara.h @@ -23,7 +23,9 @@ #include "hwplib.h" #include "hwpfile.h" #include "hinfo.h" +#include <map> #include <memory> +#include <vector> struct HBox; @@ -111,7 +113,7 @@ class DLLEXPORT HWPPara /** * Box object list */ - std::vector<std::unique_ptr<HBox>> hhstr; + std::map<unsigned short, std::unique_ptr<HBox>> hhstr; HWPPara(void); ~HWPPara(void); _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
