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++;
}
#else
#else // !wxUSE_UNICODE
// If not unicode then just use the widths we have
#if wxUSE_STD_CONTAINERS
std::copy(tpos.begin(), tpos.end(), positions);
#else
memcpy(positions, tpos.begin(), len * sizeof(int));
#endif
#endif
for (int i = 0; i < len; i++) {
positions[i] = tpos[i];
}
#endif // wxUSE_UNICODE/!wxUSE_UNICODE
}