type fixes

This commit is contained in:
Dmitry Frolov 2018-08-23 11:00:29 +03:00
parent da7eb36ffa
commit e516450fa8
4 changed files with 50 additions and 50 deletions

View file

@ -29,15 +29,15 @@ USTATUS FfsOperations::extract(const UModelIndex & index, UString & name, UByteA
if (mode == EXTRACT_MODE_AS_IS) {
// Extract as is, with header body and tail
extracted.clear();
extracted.append(model->header(index));
extracted.append(model->body(index));
extracted.append(model->tail(index));
extracted += model->header(index);
extracted += model->body(index);
extracted += model->tail(index);
}
else if (mode == EXTRACT_MODE_BODY) {
name += QObject::tr("_body");
// Extract without header and tail
extracted.clear();
extracted.append(model->body(index));
extracted += model->body(index);
}
else if (mode == EXTRACT_MODE_BODY_UNCOMPRESSED) {
name += QObject::tr("_body_unc");
@ -47,11 +47,11 @@ USTATUS FfsOperations::extract(const UModelIndex & index, UString & name, UByteA
for (int i = 0; i < model->rowCount(index); i++) {
UModelIndex childIndex = index.child(i, 0);
// Ensure 4-byte alignment of current section
extracted.append(UByteArray('\x00', ALIGN4((UINT32)extracted.size()) - (UINT32)extracted.size()));
extracted += UByteArray('\x00', ALIGN4((UINT32)extracted.size()) - (UINT32)extracted.size());
// Add current section header, body and tail
extracted.append(model->header(childIndex));
extracted.append(model->body(childIndex));
extracted.append(model->tail(childIndex));
extracted += model->header(childIndex);
extracted += model->body(childIndex);
extracted += model->tail(childIndex);
}
}
else