testStelVertexArray.cpp   testStelVertexArray.cpp 
skipping to change at line 44 skipping to change at line 44
Vec2f t(i, i); Vec2f t(i, i);
textureCoords.append(t); textureCoords.append(t);
} }
array = StelVertexArray(vertices, StelVertexArray::TriangleStrip, te xtureCoords); array = StelVertexArray(vertices, StelVertexArray::TriangleStrip, te xtureCoords);
} }
struct EmptyVisitor struct EmptyVisitor
{ {
inline void operator()(const Vec3d* v0, const Vec3d* v1, const Vec3d inline void operator()(const Vec3d* , const Vec3d* , const Vec3d* ,
* v2, const Vec2f* , const Vec2
const Vec2f* t0, const Ve f* , const Vec2f* ,
c2f* t1, const Vec2f* t2, unsigned int , unsigned i
unsigned int i0, unsigned nt , unsigned int )
int i1, unsigned int i2)
{ {
} }
}; };
void TestStelVertexArray::benchmarkForeachTriangleNoOp() void TestStelVertexArray::benchmarkForeachTriangleNoOp()
{ {
QBENCHMARK { QBENCHMARK {
array.foreachTriangle(EmptyVisitor()); array.foreachTriangle(EmptyVisitor());
} }
} }
struct VerticesVisitor struct VerticesVisitor
{ {
VerticesVisitor(const VerticesVisitor& rst) : sum(rst.sum) {} VerticesVisitor(const VerticesVisitor& rst) : sum(rst.sum) {}
VerticesVisitor() : sum(0, 0, 0) {} VerticesVisitor() : sum(0, 0, 0) {}
inline void operator()(const Vec3d* v0, const Vec3d* v1, const Vec3d inline void operator()(const Vec3d* , const Vec3d* v1, const Vec3d*
* v2, v2,
const Vec2f* t0, const Ve const Vec2f* , const Vec2
c2f* t1, const Vec2f* t2, f* , const Vec2f* ,
unsigned int i0, unsigned unsigned int , unsigned i
int i1, unsigned int i2) nt , unsigned int )
{ {
sum += *v1 + *v2; sum += *v1 + *v2;
} }
Vec3d sum; Vec3d sum;
}; };
void TestStelVertexArray::benchmarkForeachTriangle() void TestStelVertexArray::benchmarkForeachTriangle()
{ {
Vec3d sum(0, 0, 0); Vec3d sum(0, 0, 0);
 End of changes. 2 change blocks. 
12 lines changed or deleted 11 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/