let's not redundantly call this...ok, SOE?

This commit is contained in:
DarthArgus
2018-05-04 04:01:30 +00:00
parent 4a6902179d
commit 340ea95b84
2 changed files with 11 additions and 6 deletions
@@ -64,12 +64,17 @@ void DataTableManager::remove()
// ----------------------------------------------------------------------
DataTable* DataTableManager::open(const std::string& table)
DataTable* DataTableManager::open(const std::string& table, bool tryGetTable)
{
FATAL(!m_installed, ("DataTableManager::open: not installed."));
DataTable *retVal = getTable(table, false);
if (retVal)
return retVal;
DataTable *retVal = nullptr;
if (tryGetTable) {
retVal = getTable(table, false);
if (retVal)
return retVal;
}
if (!TreeFile::exists(table.c_str()))
{
@@ -125,7 +130,7 @@ DataTable * DataTableManager::getTable(const std::string& table, bool openIfNotF
{
if (openIfNotFound)
{
DataTable * dt = open(table);
DataTable * dt = open(table, false);
if (!dt)
{
DEBUG_WARNING(true, ("Could not find table [%s]", table.c_str()));
@@ -32,7 +32,7 @@ public:
private:
static void remove();
static DataTable * open(const std::string& table);
static DataTable * open(const std::string& table, bool tryGetTable = true);
DataTableManager();
~DataTableManager();