static const -> static constexpr where we can.

Change-Id: I8a6d26a89c4377dd440fa6dcf23513b7556533fc
This commit is contained in:
Sameer Agarwal
2020-04-21 10:10:01 -07:00
parent 40b27482a2
commit 57cf20aa5d
12 changed files with 26 additions and 24 deletions
+2 -2
View File
@@ -39,10 +39,10 @@ namespace ceres {
namespace internal {
// Noise factor for randomized cost function.
static const double kNoiseFactor = 0.01;
static constexpr double kNoiseFactor = 0.01;
// Default random seed for randomized cost function.
static const unsigned int kRandomSeed = 1234;
static constexpr unsigned int kRandomSeed = 1234;
// y1 = x1'x2 -> dy1/dx1 = x2, dy1/dx2 = x1
// y2 = (x1'x2)^2 -> dy2/dx1 = 2 * x2 * (x1'x2), dy2/dx2 = 2 * x1 * (x1'x2)