Remove need for Has by returning an empty Ref in Get

This commit is contained in:
Daniel Hritzkiv
2017-09-05 14:40:27 -04:00
parent 21259e0835
commit 1a5823700f
3 changed files with 3 additions and 15 deletions

View File

@@ -248,8 +248,8 @@ void glTF2Exporter::GetTexSampler(const aiMaterial* mat, Ref<Texture> texture, a
id = aId.C_Str();
}
if (mAsset->samplers.Has(id.c_str())) {
texture->sampler = mAsset->samplers.Get(id.c_str());
if (Ref<Sampler> ref = mAsset->samplers.Get(id.c_str())) {
texture->sampler = ref;
} else {
id = mAsset->FindUniqueID(id, "sampler");