Fixed bug in binary loader where result from load was always nullptr, changed pointer to pointer reference
This commit is contained in:
parent
2692db1ed3
commit
7df9897598
|
@ -84,7 +84,7 @@ namespace SHADE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SHBinaryLoader::LoadAnimClipContainer(std::ifstream& file, SHAssetData* result, AssetPath path)
|
void SHBinaryLoader::LoadAnimClipContainer(std::ifstream& file, SHAssetData*& result, AssetPath path)
|
||||||
{
|
{
|
||||||
auto const data = new SHAnimClipContainerAsset();
|
auto const data = new SHAnimClipContainerAsset();
|
||||||
|
|
||||||
|
@ -120,5 +120,7 @@ namespace SHADE
|
||||||
sizeof(uint32_t) * 2
|
sizeof(uint32_t) * 2
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
result = data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,6 @@ namespace SHADE
|
||||||
private:
|
private:
|
||||||
//Individual functions to write files
|
//Individual functions to write files
|
||||||
void WriteAnimClipContainer(std::ofstream& file,SHAssetData const* data, AssetPath path);
|
void WriteAnimClipContainer(std::ofstream& file,SHAssetData const* data, AssetPath path);
|
||||||
void LoadAnimClipContainer(std::ifstream& file,SHAssetData* result, AssetPath path);
|
void LoadAnimClipContainer(std::ifstream& file,SHAssetData*& result, AssetPath path);
|
||||||
};
|
};
|
||||||
}
|
}
|
Loading…
Reference in New Issue