From 5b96480a4582fb4dd672cd9bda0f17b36282bcbb Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 15 Jun 2020 13:55:19 -0400 Subject: [PATCH] CMaterial: Simplify Clone() a little Given we use std::array now, we can perform a direct assignment instead of a loop. --- src/Core/Resource/CMaterial.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Core/Resource/CMaterial.cpp b/src/Core/Resource/CMaterial.cpp index 2e1c38cc..a3601b12 100644 --- a/src/Core/Resource/CMaterial.cpp +++ b/src/Core/Resource/CMaterial.cpp @@ -59,10 +59,8 @@ std::unique_ptr CMaterial::Clone() pOut->mVersion = mVersion; pOut->mOptions = mOptions; pOut->mVtxDesc = mVtxDesc; - for (uint32 iKonst = 0; iKonst < 4; iKonst++) - pOut->mKonstColors[iKonst] = mKonstColors[iKonst]; - for (uint32 iTev = 0; iTev < 4; iTev++) - pOut->mTevColors[iTev] = mTevColors[iTev]; + pOut->mKonstColors = mKonstColors; + pOut->mTevColors = mTevColors; pOut->mBlendSrcFac = mBlendSrcFac; pOut->mBlendDstFac = mBlendDstFac; pOut->mLightingEnabled = mLightingEnabled;