Skip to content

Commit 21990be

Browse files
committed
Compile proc3d in c++03 mode so it works in g++-4.4
1 parent 6fbdd79 commit 21990be

File tree

2 files changed

+20
-7
lines changed

2 files changed

+20
-7
lines changed

lib/proc3d/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
find_package(Boost REQUIRED)
22

33
if(MINGW)
4-
add_definitions(-std=c++0x -fPIC -U__STRICT_ANSI__)
4+
add_definitions(-fPIC -U__STRICT_ANSI__)
55
else(MINGW)
6-
add_definitions(-std=c++0x -fPIC)
6+
add_definitions(-fPIC)
77
endif(MINGW)
88

99
include_directories(${Boost_INCLUDE_DIR})

lib/proc3d/src/proc3d.cpp

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@ namespace proc3d {
5050
/* setup ops */
5151

5252
void proc3d_load_object(void* context, const char* name, const char* filename, const double x, const double y, const double z) {
53-
boost::array<double, 3> arr = boost::array<double, 3>({x,y,z});
53+
boost::array<double, 3> arr = boost::array<double, 3>();
54+
arr[0] = x;
55+
arr[1] = y;
56+
arr[2] = z;
5457
getContext(context)->setupOps.push(LoadObject(name, filename, arr));
5558
}
5659

@@ -69,7 +72,10 @@ namespace proc3d {
6972
void proc3d_create_box(void* context, const char* name,
7073
const double x, const double y, const double z,
7174
const double width, const double length, const double height) {
72-
boost::array<double, 3> arr = boost::array<double, 3>({x,y,z});
75+
boost::array<double, 3> arr = boost::array<double, 3>();
76+
arr[0] = x;
77+
arr[1] = y;
78+
arr[2] = z;
7379
getContext(context)->setupOps.push(CreateBox(name, width, length, height, arr));
7480
}
7581

@@ -78,12 +84,19 @@ namespace proc3d {
7884
}
7985

8086
void proc3d_create_cylinder(void* context, const char* name, const double x, const double y, const double z, const double height, const double radius) {
81-
boost::array<double, 3> arr = boost::array<double, 3>({x,y,z});
82-
getContext(context)->setupOps.push(CreateCylinder{name, radius, height, arr});
87+
boost::array<double, 3> arr = boost::array<double, 3>();
88+
arr[0] = x;
89+
arr[1] = y;
90+
arr[2] = z;
91+
CreateCylinder cylinder = CreateCylinder(name, radius, height, arr);
92+
getContext(context)->setupOps.push(cylinder);
8393
}
8494

8595
void proc3d_create_cone(void* context, const char* name, const double x, const double y, const double z, const double height, const double radius) {
86-
boost::array<double, 3> arr = boost::array<double, 3>({x,y,z});
96+
boost::array<double, 3> arr = boost::array<double, 3>();
97+
arr[0] = x;
98+
arr[1] = y;
99+
arr[2] = z;
87100
getContext(context)->setupOps.push(CreateCone(name, radius, height, arr));
88101
}
89102

0 commit comments

Comments
 (0)