浏览代码

OpenDDLExport: Reduce scope of a variable

Turo Lamminen 7 年之前
父节点
当前提交
fc59f190ae
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      contrib/openddlparser/code/OpenDDLExport.cpp

+ 1 - 2
contrib/openddlparser/code/OpenDDLExport.cpp

@@ -359,11 +359,10 @@ bool OpenDDLExport::writeValueArray( DataArrayList *al, std::string &statement )
     }
 
     DataArrayList *nextDataArrayList = al ;
-    Value *nextValue( nextDataArrayList->m_dataList );
     while (ddl_nullptr != nextDataArrayList) {
         if (ddl_nullptr != nextDataArrayList) {
             statement += "{ ";
-            nextValue = nextDataArrayList->m_dataList;
+            Value *nextValue( nextDataArrayList->m_dataList );
             size_t idx( 0 );
             while (ddl_nullptr != nextValue) {
                 if (idx > 0) {