summarylogtreecommitdiffstats
path: root/constexpr.patch
blob: 5bdd4c6f2c0d2102bc2a53a3c217843e37be8e3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
diff --git a/CC/include/CCConst.h b/CC/include/CCConst.h
index 8ab70a93..085e3cae 100644
--- a/CC/include/CCConst.h
+++ b/CC/include/CCConst.h
@@ -33,17 +33,17 @@ constexpr double M_PI = 3.14159265358979323846;
 
 //! Pi/2
 #ifndef M_PI_2
-constexpr double M_PI_2 = (M_PI/2.0);
+const double M_PI_2 = (M_PI/2.0);
 #endif
 
 //! Square root of 3
 constexpr double SQRT_3 = 1.7320508075688772935274463415059;
 
 //! Conversion factor from radians to degrees
-constexpr double CC_RAD_TO_DEG = (180.0/M_PI);
+const double CC_RAD_TO_DEG = (180.0/M_PI);
 
 //! Conversion factor from degrees to radians
-constexpr double CC_DEG_TO_RAD = (M_PI/180.0);
+const double CC_DEG_TO_RAD = (M_PI/180.0);
 
 //! Numerical threshold for considering a value as "zero"
 constexpr double ZERO_TOLERANCE = static_cast<double>(FLT_EPSILON);
diff --git a/libs/qCC_db/ccCameraSensor.cpp b/libs/qCC_db/ccCameraSensor.cpp
index e19b9804..f244c28a 100644
--- a/libs/qCC_db/ccCameraSensor.cpp
+++ b/libs/qCC_db/ccCameraSensor.cpp
@@ -53,8 +53,8 @@ void ccCameraSensor::IntrinsicParameters::GetKinectDefaults(IntrinsicParameters&
 	//default Kinect parameters from:
 	// "Accuracy and Resolution of Kinect Depth Data for Indoor Mapping Applications"
 	// Kourosh Khoshelham and Sander Oude Elberink
-	constexpr float focal_mm		= static_cast<float>(5.45 * 1.0e-3);	// focal length (real distance in meter)
-	constexpr float pixelSize_mm	= static_cast<float>(9.3 * 1.0e-6);		// pixel size (real distance in meter)
+	const float focal_mm		= static_cast<float>(5.45 * 1.0e-3);	// focal length (real distance in meter)
+	const float pixelSize_mm	= static_cast<float>(9.3 * 1.0e-6);		// pixel size (real distance in meter)
 	
 	params.vertFocal_pix      = ConvertFocalMMToPix(focal_mm, pixelSize_mm);
 	params.pixelSize_mm[0]    = pixelSize_mm;
diff --git a/libs/qCC_db/ccColorTypes.h b/libs/qCC_db/ccColorTypes.h
index d456f3e8..8433cea2 100644
--- a/libs/qCC_db/ccColorTypes.h
+++ b/libs/qCC_db/ccColorTypes.h
@@ -119,7 +119,7 @@ namespace ccColor
 
 	// Predefined colors (default type)
 	constexpr Rgb whiteRGB					(MAX, MAX, MAX);
-	constexpr Rgb lightGreyRGB				(static_cast<ColorCompType>(MAX*0.8), static_cast<ColorCompType>(MAX*0.8), static_cast<ColorCompType>(MAX*0.8));
+	const Rgb lightGreyRGB				(static_cast<ColorCompType>(MAX*0.8), static_cast<ColorCompType>(MAX*0.8), static_cast<ColorCompType>(MAX*0.8));
 	constexpr Rgb darkGreyRGB				(MAX / 2, MAX / 2, MAX / 2);
 	constexpr Rgb redRGB					(MAX, 0, 0);
 	constexpr Rgb greenRGB					(0, MAX, 0);
@@ -133,7 +133,7 @@ namespace ccColor
 
 	// Predefined colors (default type)
 	constexpr Rgba white					(MAX, MAX, MAX, MAX);
-	constexpr Rgba lightGrey				(static_cast<ColorCompType>(MAX*0.8), static_cast<ColorCompType>(MAX*0.8), static_cast<ColorCompType>(MAX*0.8), MAX);
+	const Rgba lightGrey				(static_cast<ColorCompType>(MAX*0.8), static_cast<ColorCompType>(MAX*0.8), static_cast<ColorCompType>(MAX*0.8), MAX);
 	constexpr Rgba darkGrey					(MAX / 2, MAX / 2, MAX / 2, MAX);
 	constexpr Rgba red						(MAX, 0, 0, MAX);
 	constexpr Rgba green					(0, MAX, 0, MAX);