Remove some redundant code

This commit is contained in:
Wojtek Figat
2024-12-18 18:39:58 +01:00
parent 5b98603c16
commit 8eaa906e0c
4 changed files with 1 additions and 20 deletions

View File

@@ -302,11 +302,6 @@ void AudioClip::CancelStreamingTasks()
bool AudioClip::init(AssetInitData& initData)
{
// Validate
if (initData.SerializedVersion != SerializedVersion)
{
LOG(Warning, "Invalid audio clip serialized version.");
return true;
}
if (initData.CustomData.Length() != sizeof(AudioHeader))
{
LOG(Warning, "Missing audio data.");

View File

@@ -78,14 +78,12 @@ int32 ShaderAssetBase::GetCacheChunkIndex(ShaderProfile profile)
bool ShaderAssetBase::initBase(AssetInitData& initData)
{
// Validate version
// Validate
if (initData.SerializedVersion != ShaderStorage::Header::Version)
{
LOG(Warning, "Invalid shader serialized version.");
return true;
}
// Validate data
if (initData.CustomData.Length() != sizeof(_shaderHeader))
{
LOG(Warning, "Invalid shader header.");

View File

@@ -777,11 +777,6 @@ bool TextureBase::init(AssetInitData& initData)
{
if (IsVirtual())
return false;
if (initData.SerializedVersion != TexturesSerializedVersion)
{
LOG(Error, "Invalid serialized texture version.");
return true;
}
// Get texture header for asset custom data (fast access)
TextureHeader textureHeader;

View File

@@ -228,13 +228,6 @@ bool FontAsset::init(AssetInitData& initData)
{
if (IsVirtual())
return false;
// Validate
if (initData.SerializedVersion != SerializedVersion)
{
LOG(Error, "Invalid serialized font asset version.");
return true;
}
if (initData.CustomData.Length() != sizeof(_options))
{
LOG(Error, "Missing font asset header.");