Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,12 @@ SkeletonData *SkeletonBinary::readSkeletonData(const unsigned char *binary, cons
skeletonData->_defaultSkin = defaultSkin;
skeletonData->_skins.add(defaultSkin);
}

if (!this->getError().isEmpty()) {
delete input;
delete skeletonData;
return NULL;
}
Comment on lines +283 to +287

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mixed indentation (tabs vs. spaces)

The inner lines of this new block use hard tabs (\t) for indentation, while the rest of the file uses spaces. This is inconsistent with the surrounding code pattern (e.g., lines 278–281, 294–298) and will appear misaligned in editors configured for space-based indentation.

Suggested change
if (!this->getError().isEmpty()) {
delete input;
delete skeletonData;
return NULL;
}
if (!getError().isEmpty()) {
delete input;
delete skeletonData;
return NULL;
}

Note: The suggestion also removes the unnecessary this-> qualifier on getError(), which aligns with the simpler style in similar code elsewhere in the function.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!


/* Skins. */
for (size_t i = 0, n = (size_t)readVarint(input, true); i < n; ++i) {
Expand Down Expand Up @@ -511,6 +517,7 @@ Attachment *SkeletonBinary::readAttachment(DataInput *input, Skin *skin, int slo

RegionAttachment *region = _attachmentLoader->newRegionAttachment(*skin, String(name), String(path));
if (region == NULL) {
setError("Error reading attachment: ", name.buffer());
return NULL;
}
region->_path = path;
Expand Down
Loading