diff options
Diffstat (limited to 'enginedata.cpp')
-rw-r--r-- | enginedata.cpp | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/enginedata.cpp b/enginedata.cpp index 95a2b11..fb60521 100644 --- a/enginedata.cpp +++ b/enginedata.cpp @@ -6,6 +6,7 @@ using namespace std; +Row::Row(void):nc(0),table(NULL){} Row::Row(const int _nc,const Table *const _t):nc(_nc),table(_t){ items=new RowItem[nc]; } @@ -30,7 +31,6 @@ ostream& operator<<(ostream &os,const Row &r){ } -//copies from _hd, so you can freely delete or edit the passed colheader array Table::Table(const string &_n,const int _nc,const ColHeader *const _hd):name(_n),nc(_nc){ header=new ColHeader[nc]; memcpy(header,_hd,nc*sizeof(ColHeader)); @@ -45,16 +45,6 @@ Table::Table(Table &&other):name(move(other.name)),nc(other.nc),header(other.hea other.header=nullptr; } -bool Table::insert(Row &&row){ - string key=serialise(this->header[0],row.items[0]); - cerr<<debug<<"Inserting into table '"<<this->name<<"' key="<<key<<" row="<<row<<endl; - return rows.emplace(key,move(row)).second; -} -bool Table::insert(Row &row){ - string key=serialise(this->header[0],row.items[0]); - cerr<<debug<<"Inserting into table '"<<this->name<<"' key="<<key<<" row="<<row<<endl; - return rows.emplace(key,row).second; -} string serialise(const ColHeader &header,const RowItem &rowitem){ |