[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - vcl/generic
Caolán McNamara
caolanm at redhat.com
Fri Nov 28 08:56:05 PST 2014
vcl/generic/glyphs/gcach_layout.cxx | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
New commits:
commit b30e37a88755d6c65e072f848173ad6950bafa90
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Nov 28 16:54:32 2014 +0000
Revert "Related: deb#766788 alloc on heap instead of stack"
This reverts commit 93fa8f69ea8759ec876f3683e93f47524899c00b.
I was under the impression that the data was copied in the ctor
but its not of course
Change-Id: I27d5c773052a42c76494edc820e3c56577900e8f
diff --git a/vcl/generic/glyphs/gcach_layout.cxx b/vcl/generic/glyphs/gcach_layout.cxx
index 0285b27..abd04ba 100644
--- a/vcl/generic/glyphs/gcach_layout.cxx
+++ b/vcl/generic/glyphs/gcach_layout.cxx
@@ -372,7 +372,7 @@ bool HbLayoutEngine::layout(ServerFontLayout& rLayout, ImplLayoutArgs& rArgs)
rLayout.Reserve(nGlyphCapacity);
- std::unique_ptr<vcl::ScriptRun> xScriptRun(new vcl::ScriptRun(reinterpret_cast<const UChar *>(rArgs.mpStr), rArgs.mnLength));
+ vcl::ScriptRun aScriptRun(reinterpret_cast<const UChar *>(rArgs.mpStr), rArgs.mnLength);
Point aCurrPos(0, 0);
while (true)
@@ -385,21 +385,21 @@ bool HbLayoutEngine::layout(ServerFontLayout& rLayout, ImplLayoutArgs& rArgs)
// Find script subruns.
int nCurrentPos = nBidiMinRunPos;
HbScriptRuns aScriptSubRuns;
- while (xScriptRun->next())
+ while (aScriptRun.next())
{
- if (xScriptRun->getScriptStart() <= nCurrentPos && xScriptRun->getScriptEnd() > nCurrentPos)
+ if (aScriptRun.getScriptStart() <= nCurrentPos && aScriptRun.getScriptEnd() > nCurrentPos)
break;
}
while (nCurrentPos < nBidiEndRunPos)
{
int32_t nMinRunPos = nCurrentPos;
- int32_t nEndRunPos = std::min(xScriptRun->getScriptEnd(), nBidiEndRunPos);
- HbScriptRun aRun(nMinRunPos, nEndRunPos, xScriptRun->getScriptCode());
+ int32_t nEndRunPos = std::min(aScriptRun.getScriptEnd(), nBidiEndRunPos);
+ HbScriptRun aRun(nMinRunPos, nEndRunPos, aScriptRun.getScriptCode());
aScriptSubRuns.push_back(aRun);
nCurrentPos = nEndRunPos;
- xScriptRun->next();
+ aScriptRun.next();
}
// RTL subruns should be reversed to ensure that final glyph order is
@@ -407,8 +407,7 @@ bool HbLayoutEngine::layout(ServerFontLayout& rLayout, ImplLayoutArgs& rArgs)
if (bRightToLeft)
std::reverse(aScriptSubRuns.begin(), aScriptSubRuns.end());
- xScriptRun->reset();
- xScriptRun.reset();
+ aScriptRun.reset();
for (HbScriptRuns::iterator it = aScriptSubRuns.begin(); it != aScriptSubRuns.end(); ++it)
{
More information about the Libreoffice-commits
mailing list