Skip to content

Commit 62e087b

Browse files
authored
Merge pull request #5922 from militaryCoder/master
Fixed errors caused by dynamic variable cast
2 parents ddcd9ab + d11c1a4 commit 62e087b

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

common/viewer.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1702,11 +1702,11 @@ namespace rs2
17021702
glPopAttrib();
17031703
}
17041704

1705-
static const double x = -M_PI_2;
1706-
static float _rx[4][4] = {
1707-
{ 1, 0, 0, 0 },
1708-
{ 0, float(cos(x)), float(-sin(x)), 0 },
1709-
{ 0, float(sin(x)), float(cos(x)), 0 },
1705+
auto x = static_cast<float>(-M_PI / 2);
1706+
float _rx[4][4] = {
1707+
{ 1 , 0, 0, 0 },
1708+
{ 0, static_cast<float>(cos(x)), static_cast<float>(-sin(x)), 0 },
1709+
{ 0, static_cast<float>(sin(x)), static_cast<float>(cos(x)), 0 },
17101710
{ 0, 0, 0, 1 }
17111711
};
17121712
static const double z = M_PI;

0 commit comments

Comments
 (0)