From ffaa9a3bea56bd8e82e32e187fd9dbe6ffa00993 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 19 Aug 2017 11:08:09 -0400 Subject: SW NativeVertexFormat: Utilize std::array where applicable Gets rid of some hardcoded looping bounds, and also simplifies code in some places, sometimes allowing for removal of a loop altogether. --- Source/Core/VideoBackends/Software/TransformUnit.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source/Core/VideoBackends/Software/TransformUnit.cpp') diff --git a/Source/Core/VideoBackends/Software/TransformUnit.cpp b/Source/Core/VideoBackends/Software/TransformUnit.cpp index 0b1d28c27b..e9196798fc 100644 --- a/Source/Core/VideoBackends/Software/TransformUnit.cpp +++ b/Source/Core/VideoBackends/Software/TransformUnit.cpp @@ -330,7 +330,7 @@ void TransformColor(const InputVertexData* src, OutputVertexData* dst) // color const LitChannel& colorchan = xfmem.color[chan]; if (colorchan.matsource) - std::memcpy(matcolor.data(), src->color[chan], sizeof(u32)); // vertex + matcolor = src->color[chan]; // vertex else std::memcpy(matcolor.data(), &xfmem.matColor[chan], sizeof(u32)); @@ -403,7 +403,7 @@ void TransformColor(const InputVertexData* src, OutputVertexData* dst) // abgr -> rgba const u32 rgba_color = Common::swap32(chancolor.data()); - std::memcpy(dst->color[chan], &rgba_color, sizeof(u32)); + std::memcpy(dst->color[chan].data(), &rgba_color, sizeof(u32)); } } -- cgit v1.2.3