Revert "[storage] Possibility to store metadata with records (cursor in scripts)"

This commit is contained in:
Laury
2022-05-09 18:39:02 +02:00
parent 5220dda095
commit 36fa4a4152
7 changed files with 9 additions and 195 deletions

View File

@@ -65,21 +65,6 @@ bool Script::nameCompliant(const char * name) {
return false;
}
uint16_t Script::cursorOffset() {
assert(!isNull());
Ion::Storage::MetadataRowHeader * metadataForRecord = Ion::Storage::sharedStorage()->metadataForRecord(*this);
if (metadataForRecord != nullptr) {
assert(metadataForRecord->metadataSize == 2);
return *((uint16_t*) metadataForRecord->data());
}
return -1;
}
void Script::setCursorOffset(uint16_t position) {
assert(!isNull());
Ion::Storage::sharedStorage()->setMetadataForRecord(*this, sizeof(uint16_t), &position);
}
uint8_t * StatusFromData(Script::Data d) {
return const_cast<uint8_t *>(static_cast<const uint8_t *>(d.buffer));
}