diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-01-29 12:28:46 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-01-29 17:19:27 +0100 |
commit | b2d73530b60e34c5b70bdeed34a6246ae8f8bdf6 (patch) | |
tree | 9c246c73148c3b5938696f7bf05c0c24d7d6f414 /hwpfilter | |
parent | 665c64a884f01020ec64b0493a5d7ff8a2c239fc (diff) |
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 <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'hwpfilter')
-rw-r--r-- | hwpfilter/source/hpara.cxx | 1 | ||||
-rw-r--r-- | hwpfilter/source/hpara.h | 4 |
2 files changed, 3 insertions, 2 deletions
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); |