Skip to content

Commit

Permalink
wip(vtfpp): remove more dumb std::move
Browse files Browse the repository at this point in the history
  • Loading branch information
craftablescience committed Jun 5, 2024
1 parent 0dd0350 commit d60b6e2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/vtfpp/vtfpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,19 +245,19 @@ std::vector<std::byte> VTF::getImageDataAs(ImageFormat newFormat, uint8_t mip, u
if (rawImageData.empty()) {
return {};
}
return std::move(ImageConversion::convertImageDataToFormat(rawImageData, this->format, newFormat, ImageDimensions::getMipDim(mip, this->width), ImageDimensions::getMipDim(mip, this->height)));
return ImageConversion::convertImageDataToFormat(rawImageData, this->format, newFormat, ImageDimensions::getMipDim(mip, this->width), ImageDimensions::getMipDim(mip, this->height));
}

std::vector<std::byte> VTF::getImageDataAsRGBA8888(uint8_t mip, uint16_t frame, uint16_t face, uint16_t slice) const {
return std::move(this->getImageDataAs(ImageFormat::RGBA8888, mip, frame, face, slice));
return this->getImageDataAs(ImageFormat::RGBA8888, mip, frame, face, slice);
}

std::vector<std::byte> VTF::convertAndSaveImageDataToFile(uint8_t mip, uint16_t frame, uint16_t face, uint16_t slice) const {
auto rawImageData = this->getImageData(mip, frame, face, slice);
if (rawImageData.empty()) {
return {};
}
return std::move(ImageConversion::convertImageDataToFile(rawImageData, this->format, ImageDimensions::getMipDim(mip, this->width), ImageDimensions::getMipDim(mip, this->height)));
return ImageConversion::convertImageDataToFile(rawImageData, this->format, ImageDimensions::getMipDim(mip, this->width), ImageDimensions::getMipDim(mip, this->height));
}

std::span<const std::byte> VTF::getThumbnailData() const {
Expand All @@ -272,17 +272,17 @@ std::vector<std::byte> VTF::getThumbnailDataAs(ImageFormat newFormat) const {
if (rawThumbnailData.empty()) {
return {};
}
return std::move(ImageConversion::convertImageDataToFormat(rawThumbnailData, this->thumbnailFormat, newFormat, this->thumbnailWidth, this->thumbnailHeight));
return ImageConversion::convertImageDataToFormat(rawThumbnailData, this->thumbnailFormat, newFormat, this->thumbnailWidth, this->thumbnailHeight);
}

std::vector<std::byte> VTF::getThumbnailDataAsRGBA8888() const {
return std::move(this->getThumbnailDataAs(ImageFormat::RGBA8888));
return this->getThumbnailDataAs(ImageFormat::RGBA8888);
}

std::vector<std::byte> VTF::convertAndSaveThumbnailDataToFile() const {
auto rawThumbnailData = this->getThumbnailData();
if (rawThumbnailData.empty()) {
return {};
}
return std::move(ImageConversion::convertImageDataToFile(rawThumbnailData, this->thumbnailFormat, this->thumbnailWidth, this->thumbnailHeight));
return ImageConversion::convertImageDataToFile(rawThumbnailData, this->thumbnailFormat, this->thumbnailWidth, this->thumbnailHeight);
}

0 comments on commit d60b6e2

Please sign in to comment.