summaryrefslogtreecommitdiff
path: root/basctl/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2010-12-19 16:22:15 +0000
committerCaolán McNamara <caolanm@redhat.com>2010-12-19 16:22:15 +0000
commit7133f5006c4722f7cd53d1515ba3cd0dad18f8d1 (patch)
tree38fcc6daa1acd1a0267e457b122a88e0c1f4f438 /basctl/source
parent75ed15cc5b9f96a3ebafeba77e6873db6c77f2a0 (diff)
cppcheck: the scope of this variable can be reduced
Diffstat (limited to 'basctl/source')
-rw-r--r--basctl/source/basicide/bastypes.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx
index 90b96c95ac13..036d4b2341a5 100644
--- a/basctl/source/basicide/bastypes.cxx
+++ b/basctl/source/basicide/bastypes.cxx
@@ -731,7 +731,6 @@ void BasicIDETabBar::Sort()
void CutLines( ::rtl::OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, BOOL bEraseTrailingEmptyLines )
{
sal_Int32 nStartPos = 0;
- sal_Int32 nEndPos = 0;
sal_Int32 nLine = 0;
while ( nLine < nStartLine )
{
@@ -746,7 +745,8 @@ void CutLines( ::rtl::OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, BO
if ( nStartPos != -1 )
{
- nEndPos = nStartPos;
+ sal_Int32 nEndPos = nStartPos;
+
for ( sal_Int32 i = 0; i < nLines; i++ )
nEndPos = searchEOL( rStr, nEndPos+1 );