Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/autonohm/obviously
Browse files Browse the repository at this point in the history
  • Loading branch information
sm committed Jul 6, 2015
2 parents 0a76b06 + 2ed9cba commit b286edb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions obvision/reconstruct/grid/TsdGrid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ TsdGrid::TsdGrid(const std::string& data, const EnumTsdGridLoadSource source)
std::ifstream inFile;
std::stringstream ss;

if(source == FILE)
if(source == FILE_SOURCE)
{
inFile.open(data.c_str(), std::fstream::in);
if(!inFile.is_open())
Expand All @@ -43,7 +43,7 @@ TsdGrid::TsdGrid(const std::string& data, const EnumTsdGridLoadSource source)
}
istream = &inFile;
}
else if(source == STRING)
else if(source == STRING_SOURCE)
{
ss << data;
LOGMSG(DBG_DEBUG, "loaded " << ss.str().size() << " characters into stringstream\n");
Expand All @@ -56,7 +56,7 @@ TsdGrid::TsdGrid(const std::string& data, const EnumTsdGridLoadSource source)
if( (layoutGrid < 0) || (layoutPartition < 0) || (layoutGrid > 15) || (layoutPartition > 15) )
{
LOGMSG(DBG_ERROR, " error! Partition or Gridlayout invalid!\n");
if(source == FILE)
if(source == FILE_SOURCE)
inFile.close();
std::exit(3);
}
Expand Down Expand Up @@ -101,7 +101,7 @@ TsdGrid::TsdGrid(const std::string& data, const EnumTsdGridLoadSource source)
}
}
}
if(source == FILE)
if(source == FILE_SOURCE)
{
inFile.close();
if(inFile.is_open())
Expand Down
6 changes: 3 additions & 3 deletions obvision/reconstruct/grid/TsdGrid.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ enum EnumTsdGridPartitionIdentifier{ UNINITIALIZED = 0,
EMPTY = 1,
CONTENT = 2};

enum EnumTsdGridLoadSource{ FILE = 0,
STRING = 1
enum EnumTsdGridLoadSource{ FILE_SOURCE = 0,
STRING_SOURCE = 1
};

/**
Expand All @@ -61,7 +61,7 @@ class TsdGrid
* Loads the grid data out of a given file. File has to be correct it is not being checked.
* @param[in] path path to the data file
*/
TsdGrid(const std::string& data, const EnumTsdGridLoadSource source = FILE);
TsdGrid(const std::string& data, const EnumTsdGridLoadSource source = FILE_SOURCE);

/**
* Destructor
Expand Down

0 comments on commit b286edb

Please sign in to comment.