Skip to content

Commit add6571

Browse files
committed
Fix initialization of std::array for gcc-5.3
This commit adds another braces to avoid the bug of gcc-5.3 which causes a compilation error when std::array is initialized with single braces.
1 parent fb88645 commit add6571

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎opengl_ros_lib/src/depth_image_projector.cpp‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ struct DepthImageProjector::Impl
6868
//not const parameters
6969
std::array<float, 2> depthFocalLength_ = {};
7070
std::array<float, 2> depthCenter_ = {};
71-
std::array<float, 16> depthToMap_ = {0.0f, -1.0f, 0.0f, 0.0f,
72-
0.0f, 0.0f, -1.0f, 0.0f,
73-
1.0f, 0.0f, 0.0f, 0.0f,
74-
0.0f, 0.0f, 0.0f, 1.0f};
71+
std::array<float, 16> depthToMap_ = {{0.0f, -1.0f, 0.0f, 0.0f,
72+
0.0f, 0.0f, -1.0f, 0.0f,
73+
1.0f, 0.0f, 0.0f, 0.0f,
74+
0.0f, 0.0f, 0.0f, 1.0f}};
7575

7676
Impl(int colorWidth, int colorHeight,
7777
int depthWidth, int depthHeight,

0 commit comments

Comments
 (0)