@@ -1038,7 +1038,9 @@ ShapeHandle box2d::shape_create_circle(real_t radius, b2Vec2 pos) {
1038
1038
ShapeHandle box2d::shape_create_concave_polyline (const b2Vec2 *points, size_t point_count) {
1039
1039
b2Hull hull;
1040
1040
ERR_FAIL_COND_V (point_count > b2_maxPolygonVertices, invalid_shape_handle ());
1041
- std::copy (&hull.points [0 ], &hull.points [point_count], points);
1041
+ for (int i = 0 ; i < point_count; i++) {
1042
+ hull.points [i] = points[i];
1043
+ }
1042
1044
hull.count = point_count;
1043
1045
b2Polygon polygon_shape = b2MakePolygon (&hull, 0.0 );
1044
1046
return ShapeHandle{
@@ -1051,7 +1053,9 @@ ShapeHandle box2d::shape_create_concave_polyline(const b2Vec2 *points, size_t po
1051
1053
ShapeHandle box2d::shape_create_convex_polyline (const b2Vec2 *points, size_t point_count) {
1052
1054
b2Hull hull;
1053
1055
ERR_FAIL_COND_V (point_count > b2_maxPolygonVertices, invalid_shape_handle ());
1054
- std::copy (&hull.points [0 ], &hull.points [point_count], points);
1056
+ for (int i = 0 ; i < point_count; i++) {
1057
+ hull.points [i] = points[i];
1058
+ }
1055
1059
hull.count = point_count;
1056
1060
b2Polygon polygon_shape = b2MakePolygon (&hull, 0.0 );
1057
1061
return ShapeHandle{
@@ -1076,7 +1080,9 @@ ShapeHandle box2d::shape_create_halfspace(const b2Vec2 normal, real_t distance)
1076
1080
1077
1081
b2Hull hull;
1078
1082
ERR_FAIL_COND_V (4 > b2_maxPolygonVertices, invalid_shape_handle ());
1079
- std::copy (&hull.points [0 ], &hull.points [4 ], points);
1083
+ for (int i = 0 ; i < 4 ; i++) {
1084
+ hull.points [i] = points[i];
1085
+ }
1080
1086
hull.count = 4 ;
1081
1087
b2Polygon polygon_shape = b2MakePolygon (&hull, 0.0 );
1082
1088
return ShapeHandle{
0 commit comments