The current tree-style design is, hmm . . . not optimal.
[aesalon.git] / gui / src / storage / BlockTreeNode.cpp
blobb30356db70497f2dd117973c5b80762bf197b9bb
1 #include "BlockTreeNode.h"
3 bool BlockTreeNode::operator<(const BlockTreeNode &other) const {
4 return address < other.address;
7 bool BlockTreeNode::operator>(const BlockTreeNode &other) const {
8 return address > other.address;
11 bool BlockTreeNode::operator==(const BlockTreeNode &other) const {
12 return address == other.address;
15 BlockTreeNode *BlockTreeNode::find_block_by_address(MemoryAddress address) const {
16 if(address == get_address()) return this;
17 if(address < get_left()->get_address())
18 return NULL;