Skip to content

Commit

Permalink
Update indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
pmeems committed Sep 4, 2017
1 parent addf08d commit 3f98b51
Showing 1 changed file with 29 additions and 31 deletions.
60 changes: 29 additions & 31 deletions src/COM classes/Shapefile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -490,45 +490,43 @@ STDMETHODIMP CShapefile::LoadDataFrom(BSTR ShapefileName, ICallback *cBack, VARI
ErrorMessage(tkINMEMORY_SHAPEFILE_EXPECTED);
return S_OK;
}
else

if (OpenCore(OLE2CA(ShapefileName), cBack))
{
if (OpenCore(OLE2CA(ShapefileName), cBack))
{
// loading data in-memory
VARIANT_BOOL vb;
_isEditingShapes = false;
StartEditingShapes(VARIANT_TRUE, cBack, &vb);
// loading data in-memory
VARIANT_BOOL vb;
_isEditingShapes = false;
StartEditingShapes(VARIANT_TRUE, cBack, &vb);

// this will trigger loading of all DBF values into the memory
long numFields;
this->get_NumFields(&numFields);
if (numFields > 0)
// this will trigger loading of all DBF values into the memory
long numFields;
this->get_NumFields(&numFields);
if (numFields > 0)
{
CComVariant var;
for(size_t i = 0; i < _shapeData.size(); i++)
{
CComVariant var;
for(size_t i = 0; i < _shapeData.size(); i++)
{
_table->get_CellValue(0, i, &var);
}
_table->get_CellValue(0, i, &var);
}
}

// closing disk file despite the result success or failure
_shpfileName = "";
_shxfileName = "";
_dbffileName = "";

if( _shpfile != NULL)
fclose(_shpfile);
_shpfile = NULL;
// closing disk file despite the result success or failure
_shpfileName = "";
_shxfileName = "";
_dbffileName = "";

if( _shpfile != NULL)
fclose(_shpfile);
_shpfile = NULL;

if( _shxfile != NULL)
fclose(_shxfile);
_shxfile = NULL;
if( _shxfile != NULL)
fclose(_shxfile);
_shxfile = NULL;

if( _table != NULL )
((CTableClass*)_table)->CloseUnderlyingFile();
if( _table != NULL )
((CTableClass*)_table)->CloseUnderlyingFile();

*retval = vb;
}
*retval = vb;
}
return S_OK;
}
Expand Down

0 comments on commit 3f98b51

Please sign in to comment.