[cppcheck-fix][reduce-scope]

This commit is contained in:
tpaviot
2011-08-08 12:52:26 +02:00
parent eb49e93b7b
commit 9f83eceb47
+6 -10
View File
@@ -876,8 +876,6 @@ EnumTypeDescriptor::GenerateExpress (std::string &buf) const
buf.append(" = ENUMERATION OF \n (");
const char *desc = Description();
const char *ptr = &(desc[16]);
int count;
int i;
int all_comments = 1;
while(*ptr != '\0')
@@ -897,8 +895,8 @@ EnumTypeDescriptor::GenerateExpress (std::string &buf) const
// count is # of WHERE rules
if(_where_rules != 0)
{
count = _where_rules->Count();
for(i = 0; i < count; i++) // print out each UNIQUE rule
int count = _where_rules->Count();
for(int i = 0; i < count; i++) // print out each UNIQUE rule
{
if( !(*(_where_rules))[i]->_label.size() )
all_comments = 0;
@@ -909,7 +907,7 @@ EnumTypeDescriptor::GenerateExpress (std::string &buf) const
else
buf.append(" WHERE\n");
for(i = 0; i < count; i++) // print out each WHERE rule
for(int i = 0; i < count; i++) // print out each WHERE rule
{
if( !(*(_where_rules))[i]->_comment.empty() )
{
@@ -1598,8 +1596,6 @@ TypeDescriptor::GenerateExpress (std::string &buf) const
buf.append(" = ");
const char *desc = Description();
const char *ptr = desc;
int count;
int i;
int all_comments = 1;
while(*ptr != '\0')
@@ -1621,8 +1617,8 @@ TypeDescriptor::GenerateExpress (std::string &buf) const
// count is # of WHERE rules
if(_where_rules != 0)
{
count = _where_rules->Count();
for(i = 0; i < count; i++) // print out each UNIQUE rule
int count = _where_rules->Count();
for(int i = 0; i < count; i++) // print out each UNIQUE rule
{
if( !(*(_where_rules))[i]->_label.size() )
all_comments = 0;
@@ -1633,7 +1629,7 @@ TypeDescriptor::GenerateExpress (std::string &buf) const
else
buf.append(" WHERE\n");
for(i = 0; i < count; i++) // print out each WHERE rule
for(int i = 0; i < count; i++) // print out each WHERE rule
{
if( !(*(_where_rules))[i]->_comment.empty() )
{