Merge "Make headers C++11 compatible."
diff --git a/suite/cts/deviceTests/opengl/jni/reference/scene/flocking/Boid.h b/suite/cts/deviceTests/opengl/jni/reference/scene/flocking/Boid.h
index e50acd0..3e4367a 100644
--- a/suite/cts/deviceTests/opengl/jni/reference/scene/flocking/Boid.h
+++ b/suite/cts/deviceTests/opengl/jni/reference/scene/flocking/Boid.h
@@ -16,6 +16,7 @@
#define BOID_H
#include <graphics/Vector2D.h>
+#include <utils/Compat.h>
class Boid {
public:
@@ -24,14 +25,14 @@
void flock(const Boid* boids[], int numBoids, int index, float limitX, float limitY);
// The following floats are the parameters for the flocking algorithm, changing these
// modifies the boid's behaviour.
- static const float MAX_SPEED = 2.0f;// Upper limit of boid velocity.
- static const float MAX_FORCE = 0.05f;// Upper limit of the force used to push a boid.
- static const float NEIGHBOUR_RADIUS = 70.0f;// Radius used to find neighbours, was 50.
- static const float DESIRED_BOID_DIST = 35.0f;// Distance boids want to be from others, was 25.
+ static const CONSTEXPR float MAX_SPEED = 2.0f;// Upper limit of boid velocity.
+ static const CONSTEXPR float MAX_FORCE = 0.05f;// Upper limit of the force used to push a boid.
+ static const CONSTEXPR float NEIGHBOUR_RADIUS = 70.0f;// Radius used to find neighbours, was 50.
+ static const CONSTEXPR float DESIRED_BOID_DIST = 35.0f;// Distance boids want to be from others, was 25.
// The weightings of the components.
- static const float SEPARATION_WEIGHT = 2.0f;
- static const float ALIGNMENT_WEIGHT = 1.0f;
- static const float COHESION_WEIGHT = 1.0f;
+ static const CONSTEXPR float SEPARATION_WEIGHT = 2.0f;
+ static const CONSTEXPR float ALIGNMENT_WEIGHT = 1.0f;
+ static const CONSTEXPR float COHESION_WEIGHT = 1.0f;
Vector2D mPosition;
Vector2D mVelocity;
Vector2D mAcceleration;
diff --git a/suite/cts/deviceTests/opengl/jni/reference/scene/flocking/FlockingScene.h b/suite/cts/deviceTests/opengl/jni/reference/scene/flocking/FlockingScene.h
index 97bd4cc..7cdcffe 100644
--- a/suite/cts/deviceTests/opengl/jni/reference/scene/flocking/FlockingScene.h
+++ b/suite/cts/deviceTests/opengl/jni/reference/scene/flocking/FlockingScene.h
@@ -15,6 +15,7 @@
#define FLOCKINGSCENE_H
#include <graphics/Program.h>
+#include <utils/Compat.h>
#include "../Scene.h"
#include "Boid.h"
@@ -41,6 +42,6 @@
float mBoardHeight;
Program* mMainProgram;
Program* mWaterProgram;
- static const float BOID_SCALE = 1.0f / 50.0f;
+ static const CONSTEXPR float BOID_SCALE = 1.0f / 50.0f;
};
#endif