Minor compile warning cleanup

main
Aristo7 5 years ago
parent 64d980bc03
commit f4def0c93f

@ -2414,7 +2414,7 @@ void CCryEditDoc::InitEmptyLevel(int /*resolution*/, int /*unitSize*/, bool /*bU
GetIEditor()->SetStatusText("Ready");
}
void CCryEditDoc::CreateDefaultLevelAssets(int resolution, int unitSize)
void CCryEditDoc::CreateDefaultLevelAssets([[maybe_unused]] int resolution, [[maybe_unused]] int unitSize)
{
AzToolsFramework::EditorLevelNotificationBus::Broadcast(&AzToolsFramework::EditorLevelNotificationBus::Events::OnNewLevelCreated);
}

@ -257,39 +257,6 @@ namespace GradientSignal
return AZ::Uuid::CreateString("{7520DF20-16CA-4CF6-A6DB-D96759A09EE4}");
}
static AZStd::unique_ptr<ImageAsset> LegacyLoadImageFromPath(const AZStd::string& fullPath)
{
ImageProcessing::IImageObjectPtr imageObject;
ImageProcessing::ImageProcessingRequestBus::BroadcastResult(imageObject, &ImageProcessing::ImageProcessingRequests::LoadImage,
fullPath);
if (!imageObject)
{
return {};
}
//create a new image asset
auto imageAsset = AZStd::make_unique<ImageAsset>();
if (!imageAsset)
{
return {};
}
imageAsset->m_imageWidth = imageObject->GetWidth(0);
imageAsset->m_imageHeight = imageObject->GetHeight(0);
imageAsset->m_imageFormat = imageObject->GetPixelFormat();
AZ::u8* mem = nullptr;
AZ::u32 pitch = 0;
AZ::u32 mipBufferSize = imageObject->GetMipBufSize(0);
imageObject->GetImagePointer(0, mem, pitch);
imageAsset->m_imageData = { mem, mem + mipBufferSize };
return imageAsset;
}
static ImageProcessing::EPixelFormat AtomPixelFormatToLegacyPixelFormat(ImageProcessingAtom::EPixelFormat atomPixFormat)
{
// This could be dangerous to do if these enums have differences in the middle.

Loading…
Cancel
Save