summaryrefslogtreecommitdiff
path: root/basctl
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
commit21e5de234d8fba461fad8efcdc2a80854186c40d (patch)
treeff32fba2f97dd8139f02457b3f719cffe55394d5 /basctl
parent1830edb5023447de28bff83e77ccbc30f43e794b (diff)
cppcheck: the scope of this variable can be reduced
Diffstat (limited to 'basctl')
-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 6ca815135..aeb7b38b9 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 );