mirror of
https://github.com/huderlem/porymap.git
synced 2026-08-13 12:26:05 -05:00
lots of changes
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user