summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFridrich Štrba <fridrich.strba@bluewin.ch>2012-07-25 14:08:08 +0200
committerFridrich Štrba <fridrich.strba@bluewin.ch>2012-07-25 14:08:08 +0200
commit4c9f9f0c7b27c3da80bd9872881c530525fbd5e4 (patch)
tree8688d97b7fc70f7353368adc5d4a47040b12040c
parentd76442dae8301d74625e3dff25838f46f7afbec0 (diff)
Keep pointer numbers around
-rw-r--r--src/lib/VSDXParser.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/VSDXParser.cpp b/src/lib/VSDXParser.cpp
index 8e97bbb..8c0cd70 100644
--- a/src/lib/VSDXParser.cpp
+++ b/src/lib/VSDXParser.cpp
@@ -130,7 +130,7 @@ void libvisio::VSDXParser::handleStreams(WPXInputStream *input, unsigned shift,
readU32(input);
unsigned pointerCount = readU32(input);
input->seek(4, WPX_SEEK_CUR);
- std::vector<libvisio::Pointer> PtrList;
+ std::vector<std::pair<unsigned, libvisio::Pointer> > PtrList;
for (unsigned i = 0; i < pointerCount; i++)
{
Pointer ptr;
@@ -140,12 +140,12 @@ void libvisio::VSDXParser::handleStreams(WPXInputStream *input, unsigned shift,
ptr.Length = readU32(input);
ptr.Format = readU16(input);
if (ptr.Type == VSD_FONTFACES)
- PtrList.insert(PtrList.begin(),ptr);
+ PtrList.insert(PtrList.begin(),std::make_pair(i, ptr));
else if (ptr.Type != 0)
- PtrList.push_back(ptr);
+ PtrList.push_back(std::make_pair(i, ptr));
}
for (unsigned j = 0; j < PtrList.size(); j++)
- handleStream(PtrList[j], j, level+1);
+ handleStream(PtrList[j].second, PtrList[j].first, level+1);
}