summaryrefslogtreecommitdiff
path: root/vcl/generic/glyphs/gcach_layout.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-11-28 16:55:56 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-11-28 16:57:40 +0000
commit33e8afd668a24285335e42fdcc5d894e046c5bba (patch)
tree0718c6e2dc6d3e20905ce1103c5d1d33b750afe9 /vcl/generic/glyphs/gcach_layout.cxx
parent3124dadde5e8c5b282685566c9005879d3ae65c1 (diff)
Revert "Related: deb#766788 alloc on heap instead of stack"
This reverts commit acdf54c4142b7a51b99eacacee470ac31d6ff0ae. Change-Id: I1c49a5baac3a3421d23926f4479e674ef46fbf34
Diffstat (limited to 'vcl/generic/glyphs/gcach_layout.cxx')
-rw-r--r--vcl/generic/glyphs/gcach_layout.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/vcl/generic/glyphs/gcach_layout.cxx b/vcl/generic/glyphs/gcach_layout.cxx
index 0c0bad22cd18..abd04baf41cf 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,7 +407,7 @@ bool HbLayoutEngine::layout(ServerFontLayout& rLayout, ImplLayoutArgs& rArgs)
if (bRightToLeft)
std::reverse(aScriptSubRuns.begin(), aScriptSubRuns.end());
- xScriptRun->reset();
+ aScriptRun.reset();
for (HbScriptRuns::iterator it = aScriptSubRuns.begin(); it != aScriptSubRuns.end(); ++it)
{