summaryrefslogtreecommitdiff
path: root/basctl/source/basicide/layout.cxx
diff options
context:
space:
mode:
authorUray M. János <uray.janos@gmail.com>2012-09-07 11:47:21 +0200
committerAndras Timar <atimar@suse.com>2012-09-07 11:55:31 +0200
commiteab15a8a2e2b5f524edc0c990dcaa963b8f2a6c5 (patch)
tree9b158671cc4c837153866b30083f8863102f5a20 /basctl/source/basicide/layout.cxx
parent70d1b98a53cae469aeadb070c5681c76d6e6996f (diff)
-Werror: initialize iLastWin with an invalid value
iLastWin will get a valid value if !bEmpty Change-Id: I8f598b7a9d5e8317fca0ef0fcc3313bc0691f0da
Diffstat (limited to 'basctl/source/basicide/layout.cxx')
-rw-r--r--basctl/source/basicide/layout.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/basctl/source/basicide/layout.cxx b/basctl/source/basicide/layout.cxx
index 0f672e2a3a09..b9a5e8ec6c35 100644
--- a/basctl/source/basicide/layout.cxx
+++ b/basctl/source/basicide/layout.cxx
@@ -283,8 +283,8 @@ void Layout::SplittedSide::ArrangeIn (Rectangle const& rRect)
// positioning separator lines and windows
bool bPrevDocking = false; // is the previous window docked?
long nStartPos = 0; // window position in the strip
- unsigned iLastWin; // index of last docking window in the strip
- // (iLastWin will be initialized if !bEmpty)
+ unsigned iLastWin = vItems.size(); // index of last docking window in the strip
+
for (unsigned i = 0; i != vItems.size(); ++i)
{
// window
@@ -309,7 +309,7 @@ void Layout::SplittedSide::ArrangeIn (Rectangle const& rRect)
if (bPrevDocking)
{
rSplit.Show();
- // the actual pozition and size of the line
+ // the actual position and size of the line
rSplit.SetPosSizePixel(
MakePoint(nPos2 + nStartPos - nSplitThickness, nPos1),
MakeSize(nSplitThickness, nSize - nSplitThickness)