X-Git-Url: https://git.llucax.com/z.facultad/75.52/treemulator.git/blobdiff_plain/8699d7e1ccbda4282f8ba693422f337be31d100b..bb83fdaa6e234bff23810b22fca3a098e2afb975:/src/btree_data.cpp?ds=sidebyside diff --git a/src/btree_data.cpp b/src/btree_data.cpp index 46917d6..7ba3448 100644 --- a/src/btree_data.cpp +++ b/src/btree_data.cpp @@ -43,9 +43,17 @@ uchar* BTreeData::ToArray () const bool BTreeData::operator < (const BTreeData &data) const { + if (!data.clave) return false; + return (*clave) < (*(data.clave)); } +bool BTreeData::operator == (const BTreeData &data) const +{ + if (!data.clave) return false; + + return (*clave) == (*(data.clave)); +} BTreeLeafData::~BTreeLeafData () {