summaryrefslogtreecommitdiff
path: root/core/fxge/win32/cfx_psrenderer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxge/win32/cfx_psrenderer.cpp')
-rw-r--r--core/fxge/win32/cfx_psrenderer.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/core/fxge/win32/cfx_psrenderer.cpp b/core/fxge/win32/cfx_psrenderer.cpp
index dbc212123c..12795d0cc5 100644
--- a/core/fxge/win32/cfx_psrenderer.cpp
+++ b/core/fxge/win32/cfx_psrenderer.cpp
@@ -311,13 +311,10 @@ void CFX_PSRenderer::SetGraphState(const CFX_GraphStateData* pGraphState) {
buf << pGraphState->m_LineCap << " J\n";
}
if (!m_bGraphStateSet ||
- m_CurGraphState.m_DashCount != pGraphState->m_DashCount ||
- memcmp(m_CurGraphState.m_DashArray, pGraphState->m_DashArray,
- sizeof(float) * m_CurGraphState.m_DashCount)) {
+ m_CurGraphState.m_DashArray != pGraphState->m_DashArray) {
buf << "[";
- for (int i = 0; i < pGraphState->m_DashCount; ++i)
- buf << pGraphState->m_DashArray[i] << " ";
-
+ for (const auto& dash : pGraphState->m_DashArray)
+ buf << dash << " ";
buf << "]" << pGraphState->m_DashPhase << " d\n";
}
if (!m_bGraphStateSet ||
@@ -332,7 +329,7 @@ void CFX_PSRenderer::SetGraphState(const CFX_GraphStateData* pGraphState) {
m_CurGraphState.m_MiterLimit != pGraphState->m_MiterLimit) {
buf << pGraphState->m_MiterLimit << " M\n";
}
- m_CurGraphState.Copy(*pGraphState);
+ m_CurGraphState = *pGraphState;
m_bGraphStateSet = true;
WriteToStream(&buf);
}