Setting code formatting standard to allman.

This commit is contained in:
emb
2015-01-01 14:08:42 -06:00
parent 174ea4f4f9
commit 6410139f87
76 changed files with 5352 additions and 5314 deletions

View File

@@ -1,5 +1,5 @@
/* This file is subject to the terms and conditions defined in
* file 'LICENSE.txt', which is part of this source code package.
/* This file is subject to the terms and conditions defined in
* file 'LICENSE.txt', which is part of this source code package.
*/
#include "DB.h"
#include "../Utility/Log.h"
@@ -8,42 +8,42 @@
#include <fstream>
DB::DB(std::string dbFile)
: Path(dbFile)
, Handle(NULL)
: Path(dbFile)
, Handle(NULL)
{
}
DB::~DB()
{
DeInitialize();
DeInitialize();
}
bool DB::Initialize()
{
bool retVal = false;
bool retVal = false;
if(sqlite3_open(Path.c_str(), &Handle) != 0)
{
std::stringstream ss;
ss << "Cannot open database: \"" << Path << "\"" << sqlite3_errmsg(Handle);
Logger::Write(Logger::ZONE_ERROR, "Database", ss.str());
}
else
{
Logger::Write(Logger::ZONE_INFO, "Database", "Opened database \"" + Path + "\"");
retVal = true;
}
if(sqlite3_open(Path.c_str(), &Handle) != 0)
{
std::stringstream ss;
ss << "Cannot open database: \"" << Path << "\"" << sqlite3_errmsg(Handle);
Logger::Write(Logger::ZONE_ERROR, "Database", ss.str());
}
else
{
Logger::Write(Logger::ZONE_INFO, "Database", "Opened database \"" + Path + "\"");
retVal = true;
}
return retVal;
return retVal;
}
void DB::DeInitialize()
{
if(Handle != NULL)
{
sqlite3_close(Handle);
Handle = NULL;
}
if(Handle != NULL)
{
sqlite3_close(Handle);
Handle = NULL;
}
}