<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Looking at how the data is used, I'm pretty sure these
data-structures could be modified to use std::vector, and the node
structure stored directly like this:<br>
<pre wrap="">std::vector<HWPPara> plist;
...and...
extern std::vector<Node> nodelist;
which would be more memory-efficient, but I suppose it doesn't really matter for this case?
</pre>
<br>
Regards, Noel Grandin<br>
<br>
On 2012-03-02 17:39, Dézsi Szabolcs wrote:
<blockquote cite="mid:COL121-W21639282A742A43D6DD5ADCD6D0@phx.gbl"
type="cite">
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
<div dir="ltr">
<pre class="bz_comment_text" id="comment_text_1">Hi!
I removed every use of LinkedList and replaced it with std::list
I hope everything's correct. Tested it with the .hwp file in
hwpfilter/qa/cppunit/data (pass and fail). Working as expected.
LinkedList had a find(int n) method, which returned the underlying
std::vector's nth element, unfortunately this isn't possible with std::list, so
the calls to find(...) and replaced with iterating with a for loop i times,
thus pointing the iterator to the nth element of the list.
Don't know if it's a very good solution though. The original find method had an
assertion that the parameter is between 0 and the size of the underlying
vector.
If something is wrong, let me know, and i try to enhance/work on it. Or feel
free to improve it :)
<a moz-do-not-send="true" href="https://bugs.freedesktop.org/show_bug.cgi?id=45678">https://bugs.freedesktop.org/show_bug.cgi?id=45678</a>
Szabolcs</pre>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
LibreOffice mailing list
<a class="moz-txt-link-abbreviated" href="mailto:LibreOffice@lists.freedesktop.org">LibreOffice@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freedesktop.org/mailman/listinfo/libreoffice">http://lists.freedesktop.org/mailman/listinfo/libreoffice</a>
</pre>
</blockquote>
<br><br><br><hr><font size="-2" color=808080>Disclaimer: <a href="http://www.peralex.com/disclaimer.html">http://www.peralex.com/disclaimer.html</a><br><br>
</body>
</html>