lots of changes

This commit is contained in:
yenatch
2017-11-27 23:46:27 -05:00
parent 2246ead5a8
commit 11212dc640
30 changed files with 2575 additions and 895 deletions

View File

@@ -1,4 +1,5 @@
#include "blockdata.h"
#include <QDebug>
Blockdata::Blockdata(QObject *parent) : QObject(parent)
{
@@ -37,3 +38,18 @@ Blockdata* Blockdata::copy() {
blockdata->copyFrom(this);
return blockdata;
}
bool Blockdata::equals(Blockdata *other) {
if (!other) {
return false;
}
if (blocks->length() != other->blocks->length()) {
return false;
}
for (int i = 0; i < blocks->length(); i++) {
if (blocks->value(i) != other->blocks->value(i)) {
return false;
}
}
return true;
}