1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-27 21:01:50 +03:00

Reformat all code to coding standard

This commit is contained in:
Andrew Hutchings
2017-10-26 17:18:17 +01:00
parent 4985f3456e
commit 01446d1e22
1296 changed files with 403852 additions and 353747 deletions

View File

@ -28,42 +28,43 @@
using namespace std;
namespace BRM {
namespace BRM
{
Undoable::Undoable()
{
}
Undoable::~Undoable()
Undoable::~Undoable()
{
}
inline void Undoable::makeUndoRecord(void *start, int size)
inline void Undoable::makeUndoRecord(void* start, int size)
{
ImageDelta d;
ImageDelta d;
if (size > ID_MAXSIZE)
throw overflow_error("Undoable::makeUndoRecord(): size > max");
if (size > ID_MAXSIZE)
throw overflow_error("Undoable::makeUndoRecord(): size > max");
d.start = start;
d.size = size;
memcpy(d.data, start, size);
undoRecords.push_back(d);
d.start = start;
d.size = size;
memcpy(d.data, start, size);
undoRecords.push_back(d);
}
void Undoable::undoChanges()
{
vector<ImageDelta>::reverse_iterator it;
vector<ImageDelta>::reverse_iterator it;
for (it = undoRecords.rbegin(); it != undoRecords.rend(); it++)
memcpy((*it).start, (*it).data, (*it).size);
for (it = undoRecords.rbegin(); it != undoRecords.rend(); it++)
memcpy((*it).start, (*it).data, (*it).size);
undoRecords.clear();
undoRecords.clear();
}
void Undoable::confirmChanges()
{
undoRecords.clear();
undoRecords.clear();
}
}