Fix MeasureWidths() in wxSTC in non-Unicode build.

Integer values must be converted to floats instead of just using memcpy().

Closes #15617.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75097 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2013-10-29 12:17:40 +00:00
parent b727da4d23
commit 1210587617

View File

@@ -537,15 +537,12 @@ void SurfaceImpl::MeasureWidths(Font &font, const char *s, int len, XYPOSITION *
} }
ui++; ui++;
} }
#else #else // !wxUSE_UNICODE
// If not unicode then just use the widths we have // If not unicode then just use the widths we have
#if wxUSE_STD_CONTAINERS for (int i = 0; i < len; i++) {
std::copy(tpos.begin(), tpos.end(), positions); positions[i] = tpos[i];
#else }
memcpy(positions, tpos.begin(), len * sizeof(int)); #endif // wxUSE_UNICODE/!wxUSE_UNICODE
#endif
#endif
} }